Documentation
¶
Index ¶
- func CaptureTerm(f func() (any, error)) (string, error)
- func CollectFsTools() []ai.Tool
- func TeeTerm(f func() (any, error)) (string, error)
- type Agent
- type EmptyResponseError
- type FindFilesParams
- type Generator
- type GenkitGenerator
- type GenkitToolManager
- type ListFilesParams
- type Printer
- type ReadFileParams
- type ToolManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectFsTools ¶
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func (*Agent) StartWithMessage ¶
type EmptyResponseError ¶
type EmptyResponseError struct{}
func (*EmptyResponseError) Error ¶
func (e *EmptyResponseError) Error() string
type FindFilesParams ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func NewGenerator(genkit *genkit.Genkit, printer Printer, toolManager *ToolManager) *Generator
type GenkitGenerator ¶
type GenkitToolManager ¶
type GenkitToolManager interface {
RegisterTools(tools ...ai.Tool)
LookupTool(name string) ai.Tool
}
func NewGenkitToolManager ¶
func NewGenkitToolManager(genkit *genkit.Genkit) GenkitToolManager
type ListFilesParams ¶
type ListFilesParams struct {
Path string `json:"path"`
}
type Printer ¶
type Printer interface {
Printf(format string, args ...interface{})
Println(args ...interface{})
}
type ReadFileParams ¶
type ReadFileParams struct {
Path string `json:"path"`
}
type ToolManager ¶
type ToolManager struct {
// contains filtered or unexported fields
}
func NewToolManager ¶
func NewToolManager(genkit *genkit.Genkit, printer Printer) *ToolManager
func (*ToolManager) ClearPrevious ¶
func (t *ToolManager) ClearPrevious()
func (*ToolManager) EqualPrevious ¶
func (t *ToolManager) EqualPrevious(toolRequests []*ai.ToolRequest) bool
func (*ToolManager) HandleToolCalls ¶
func (t *ToolManager) HandleToolCalls(ctx context.Context, requests []*ai.ToolRequest) (*ai.Message, error)
func (*ToolManager) RegisterTools ¶
func (t *ToolManager) RegisterTools(tools ...ai.Tool)
Directories
¶
| Path | Synopsis |
|---|---|
|
plugins
|
|
|
Package tools: consolidated interfaces for mocking CLI/tool dependencies
|
Package tools: consolidated interfaces for mocking CLI/tool dependencies |
Click to show internal directories.
Click to hide internal directories.