fix(singleagent): workflow as tool return directly (#526)
This commit is contained in:
@@ -113,7 +113,7 @@ func BuildAgent(ctx context.Context, conf *Config) (r *AgentRunner, err error) {
|
||||
}
|
||||
tr := newPreToolRetriever(&toolPreCallConf{})
|
||||
|
||||
wfTools, toolsReturnDirectly, err := newWorkflowTools(ctx, &workflowConfig{
|
||||
wfTools, returnDirectlyTools, err := newWorkflowTools(ctx, &workflowConfig{
|
||||
wfInfos: conf.Agent.Workflow,
|
||||
})
|
||||
if err != nil {
|
||||
@@ -176,7 +176,7 @@ func BuildAgent(ctx context.Context, conf *Config) (r *AgentRunner, err error) {
|
||||
ToolsConfig: compose.ToolsNodeConfig{
|
||||
Tools: agentTools,
|
||||
},
|
||||
ToolReturnDirectly: toolsReturnDirectly,
|
||||
ToolReturnDirectly: returnDirectlyTools,
|
||||
ModelNodeName: keyOfReActAgentChatModel,
|
||||
ToolsNodeName: keyOfReActAgentToolsNode,
|
||||
})
|
||||
@@ -273,10 +273,11 @@ func BuildAgent(ctx context.Context, conf *Config) (r *AgentRunner, err error) {
|
||||
}
|
||||
|
||||
return &AgentRunner{
|
||||
runner: runner,
|
||||
requireCheckpoint: requireCheckpoint,
|
||||
modelInfo: modelInfo,
|
||||
containWfTool: containWfTool,
|
||||
runner: runner,
|
||||
requireCheckpoint: requireCheckpoint,
|
||||
modelInfo: modelInfo,
|
||||
containWfTool: containWfTool,
|
||||
returnDirectlyTools: returnDirectlyTools,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user