Documentation
¶
Index ¶
- Constants
- func Asking[I any, O any](f func(input I, reply common.Answer[O]) api.ChatAsk) func(ctx context.Context, input I) (O, error)
- func Attach(ctx context.Context, source context.Context) context.Context
- func FromAgent(ctx context.Context) bool
- func FromJS(ctx context.Context) bool
- func NewRawTool(name string, desc string, inputSchema schema.Schema[any], ...) (tool, error)
- func NewTool[I any, O any](name string, desc string, f func(ctx context.Context, input I) (O, error)) (common.Tool, error)
- type Module
- func (m Module) Add[I any, O any](name string, desc string, f func(ctx context.Context, input I) (O, error)) (ToolID, error)
- func (m Module) AddRaw(name string, desc string, input schema.Schema[any], output schema.Schema[any], ...) (ToolID, error)
- func (m Module) AddTool(tool common.Tool) ToolID
- func (m Module) Ask[I any, O any](name string, desc string, f func(input I, reply common.Answer[O]) api.ChatAsk) (ToolID, error)
- func (m Module) Desc() string
- func (m Module) Get(name string) (common.Tool, bool)
- func (m Module) List() []common.Tool
- func (m Module) Name() string
- func (m Module) Remove(id ToolID)
- type ToolID
Constants ¶
View Source
const AskDesc = "" /* 339-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func NewRawTool ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.