Consolidated a bunch of reused code to agents
This commit is contained in:
@@ -19,7 +19,7 @@ func CreateWolframFunctions(appId string) WolframFunctions {
|
||||
"Query the Wolfram Alpha API",
|
||||
func(ctx *gollm.Context, args struct {
|
||||
Question string `description:"The question to ask Wolfram|Alpha"`
|
||||
}) (string, error) {
|
||||
}) (any, error) {
|
||||
return client.GetShortAnswerQuery(args.Question, wolfram.Imperial, 10)
|
||||
}),
|
||||
Metric: gollm.NewFunction(
|
||||
@@ -27,7 +27,7 @@ func CreateWolframFunctions(appId string) WolframFunctions {
|
||||
"Query the Wolfram Alpha API",
|
||||
func(ctx *gollm.Context, args struct {
|
||||
Question string `description:"The question to ask Wolfram|Alpha"`
|
||||
}) (string, error) {
|
||||
}) (any, error) {
|
||||
return client.GetShortAnswerQuery(args.Question, wolfram.Metric, 10)
|
||||
}),
|
||||
}
|
||||
|
Reference in New Issue
Block a user