fix(singleagent): workflow as tool return directly (#526)

This commit is contained in:
junwen-lee
2025-08-04 21:58:37 +08:00
committed by GitHub
parent 38b63f00a3
commit 0367e66eca
5 changed files with 72 additions and 34 deletions

View File

@@ -57,8 +57,9 @@ type AgentRunner struct {
runner compose.Runnable[*AgentRequest, *schema.Message]
requireCheckpoint bool
containWfTool bool
modelInfo *modelmgr.Model
returnDirectlyTools map[string]struct{}
containWfTool bool
modelInfo *modelmgr.Model
}
func (r *AgentRunner) StreamExecute(ctx context.Context, req *AgentRequest) (
@@ -66,7 +67,7 @@ func (r *AgentRunner) StreamExecute(ctx context.Context, req *AgentRequest) (
) {
executeID := uuid.New()
hdl, sr, sw := newReplyCallback(ctx, executeID.String())
hdl, sr, sw := newReplyCallback(ctx, executeID.String(), r.returnDirectlyTools)
go func() {
defer func() {