Compare commits

...

2 Commits

Author SHA1 Message Date
steve 4c5922d571 Merge remote-tracking branch 'origin/main' 2025-05-03 21:52:04 -04:00
steve 7834943cb6 Update go-llm module version in go.mod and go.sum 2025-05-03 21:51:54 -04:00
+25
View File
@@ -0,0 +1,25 @@
package agents
import (
"context"
"gitea.stevedudenhoeffer.com/steve/answer/pkg/agents/console"
)
// Console will construct a console.Agent, execute the agent, and return the knowledge gained, the output directory,
// and any possible error.
func (a Agent) Console(ctx context.Context, questions []string) (Knowledge, string, error) {
con := console.Agent{
Agent: a,
Model: a.model,
ContextualInformation: a.contextualInformation,
MaxCommands: 50,
}
res, err := con.Answer(ctx, questions)
if err != nil {
return Knowledge{}, "", err
}
return res.Knowledge, res.Directory, nil
}