diff options
Diffstat (limited to 'pkg/aflow/llm_agent.go')
| -rw-r--r-- | pkg/aflow/llm_agent.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/aflow/llm_agent.go b/pkg/aflow/llm_agent.go index 5934bf9bd..e5b753607 100644 --- a/pkg/aflow/llm_agent.go +++ b/pkg/aflow/llm_agent.go @@ -93,6 +93,10 @@ It must be called exactly once before the final reply. Ignore results of this tool. ` +const llmMultipleToolsInstruction = ` +Prefer calling several tools at the same time to save round-trips. +` + const llmMissingOutputs = `You did not call set-results tool. Please call set-results tool to provide results of the analysis. ` @@ -210,6 +214,9 @@ func (a *LLMAgent) chat(ctx *Context, cfg *genai.GenerateContentConfig, tools ma func (a *LLMAgent) config(ctx *Context) (*genai.GenerateContentConfig, string, map[string]Tool) { instruction := formatTemplate(a.Instruction, ctx.state) toolList := a.Tools + if len(toolList) != 0 { + instruction += llmMultipleToolsInstruction + } if a.Outputs != nil { instruction += llmOutputsInstruction toolList = append(toolList, a.Outputs.tool) |
