MCPcopy Create free account
hub / github.com/astercloud/aster / buildParallelDemo

Method buildParallelDemo

pkg/server/workflow_demo.go:451–462  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

449}
450
451func (s *Server) buildParallelDemo() (workflow.Agent, error) {
452 agents := []workflow.Agent{
453 NewLLMWorkflowAgent("AlgorithmA", "方案A:快速但粗糙", s.deps),
454 NewLLMWorkflowAgent("AlgorithmB", "方案B:慢但精确", s.deps),
455 NewLLMWorkflowAgent("AlgorithmC", "方案C:平衡", s.deps),
456 }
457
458 return workflow.NewParallelAgent(workflow.ParallelConfig{
459 Name: "MultiAlgorithm",
460 SubAgents: agents,
461 })
462}
463
464func (s *Server) buildLoopDemo() (workflow.Agent, error) {
465 critic := NewLLMWorkflowAgent("Critic", "评估当前方案", s.deps)

Callers 1

buildDemoWorkflowMethod · 0.95

Calls 2

NewParallelAgentFunction · 0.92
NewLLMWorkflowAgentFunction · 0.85

Tested by

no test coverage detected