Compare commits
No commits in common. "4c5922d571abdd506b3b88121be5028127c636c9" and "8ae16cb6338641a1825fb4370538161c13ae2237" have entirely different histories.
4c5922d571
...
8ae16cb633
@ -1,25 +0,0 @@
|
|||||||
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
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user