Refactored LLM handling to use updated langchaingo models and tools, replacing gollm dependencies. Introduced agent-related utilities, tools, and counters for better modular functionality. Added a parser for LLM model configuration and revamped the answering mechanism with enhanced support for tool-based interaction.
12 lines
393 B
Go
12 lines
393 B
Go
package agent
|
|
|
|
var SearchTool = FromFunction(
|
|
func(ctx *Context, args struct {
|
|
SearchFor string `description:"what to search for"`
|
|
Question string `description:"the question to answer with the search results"`
|
|
}) (FuncResponse, error) {
|
|
return FuncResponse{}, nil
|
|
}).
|
|
WithName("search").
|
|
WithDescription("Search the web and read a few articles to find the answer to the question")
|