Open txfsxq opened 5 months ago
I'll try reproduce it
When I only use one tool for calculation, I still get empty response
calculator := tools.Calculator{}
toolList := []tools.Tool{calculator}
a := agents.NewOpenAIFunctionsAgent(llm,
toolList,
agents.NewOpenAIOption().WithSystemMessage("you are a helpful assistant"),
agents.NewOpenAIOption().WithExtraMessages([]prompts.MessageFormatter{
prompts.NewHumanMessagePromptTemplate("please be strict", nil),
}),
)
e := agents.NewExecutor(a, toolList)
require.NoError(t, err)
result, err := chains.Run(context.Background(), e, "What is 3 plus 5 equal to?") //nolint:lll
require.NoError(t, err)
fmt.Println(result)
require.True(t, strings.Contains(result, "8"),
"correct answer 8 not in response")
run error: empty response
When I want to define two tools, I will get an error empty response
run error: empty response
How to solve it?