Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var StaticFunctionMap = make(map[string]ToolFunc)
Functions ¶
func IsImplementationAvailable ¶
IsImplementationAvailable checks if a function implementation exists
func RegisterFunction ¶
RegisterFunction allows runtime registration of functions (optional feature)
Types ¶
type FunctionDefinition ¶
type FunctionDefinition struct {
Name string `json:"name"`
Description string `json:"description"`
Parameters any `json:"parameters"`
}
FunctionDefinition defines a function that can be called by the LLM
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry maps a tool's name to its executable function.
func NewRegistry ¶
func NewRegistry(agentFuncs agentModels.FunctionSpecs) *Registry
NewRegistry creates a new tool registry from a list of agent function specs.
func (*Registry) ListFunctions ¶
ListFunctions returns a list of registered function names (for debugging)
func (*Registry) ToLangchainTools ¶
ToLangchainTools converts the registry to langchain-compatible []llms.Tool
type RegistryTool ¶
type RegistryTool struct {
// contains filtered or unexported fields
}
RegistryTool implements langchain's tools.Tool interface
func (*RegistryTool) Description ¶
func (t *RegistryTool) Description() string
Description returns the tool description (implements tools.Tool interface)
func (*RegistryTool) Name ¶
func (t *RegistryTool) Name() string
Name returns the tool name (implements tools.Tool interface)
type ToolSpec ¶
type ToolSpec struct {
Type string `json:"type"`
Function *FunctionDefinition `json:"function"`
}
ToolSpec represents a function specification for the LLM