Update LLM integration and add new agent tools and utilities

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.
This commit is contained in:
2025-02-25 22:56:32 -05:00
parent e1c10eb49e
commit 090b28d956
13 changed files with 1051 additions and 172 deletions

10
pkg/agent/answertool.go Normal file
View File

@@ -0,0 +1,10 @@
package agent
var AnswerTool = FromFunction(
func(ctx *Context, args struct {
Answer string `description:"the answer to the question"`
}) (FuncResponse, error) {
return FuncResponse{Result: args.Answer}, nil
}).
WithName("answer").
WithDescription("Answer the question")