Help us shape the future of Go! Take the 2026 Go Developer Survey

userprompt

package
v1.132.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ToolNameUserPrompt = "user_prompt"

Variables

This section is empty.

Functions

func CreateToolSet added in v1.60.0

func CreateToolSet() (tools.ToolSet, error)

CreateToolSet is used by the tools registry.

Types

type Args

type Args struct {
	Message string         `json:"message" jsonschema:"The message/question to display to the user"`
	Title   string         `json:"title,omitempty" jsonschema:"Optional title for the dialog window (defaults to 'Question')"`
	Schema  map[string]any `` /* 157-byte string literal not displayed */
}

type Response

type Response struct {
	Action  string         `json:"action" jsonschema:"The user action: accept, decline, or cancel"`
	Content map[string]any `json:"content,omitempty" jsonschema:"The user response data (only present when action is accept)"`
}

type ToolSet added in v1.60.0

type ToolSet struct {
	// contains filtered or unexported fields
}

func New added in v1.60.0

func New() *ToolSet

func (*ToolSet) Instructions added in v1.60.0

func (t *ToolSet) Instructions() string

func (*ToolSet) SetElicitationHandler added in v1.60.0

func (t *ToolSet) SetElicitationHandler(elicitationHandler tools.ElicitationHandler)

func (*ToolSet) Tools added in v1.60.0

func (t *ToolSet) Tools(context.Context) ([]tools.Tool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL