AgenticExecute Agentic 方式执行 - Agent 决定何时运行 workflow
(ctx context.Context, agent *WorkflowAgent, input string)
| 354 | |
| 355 | // AgenticExecute Agentic 方式执行 - Agent 决定何时运行 workflow |
| 356 | func (wf *Workflow) AgenticExecute(ctx context.Context, agent *WorkflowAgent, input string) (string, error) { |
| 357 | if agent.GetWorkflow() == nil { |
| 358 | agent.AttachWorkflow(wf) |
| 359 | } |
| 360 | return agent.Run(ctx, input) |
| 361 | } |
| 362 | |
| 363 | // AgenticExecuteStream Agentic 方式流式执行 |
| 364 | func (wf *Workflow) AgenticExecuteStream(ctx context.Context, agent *WorkflowAgent, input string) <-chan AgentStreamEvent { |
no test coverage detected