Coding
PromptBeginner5 minmarkdown
Nano Banana Pro
Agent skill for nano-banana-pro
6
工作流模块负责:
Sign in to like and favorite skills
工作流模块负责:
workflow/ ├── engine/ # 执行引擎 │ ├── engine.go # 核心引擎 │ ├── executor.go # 节点执行器 │ ├── scheduler.go # 调度器 │ ├── context.go # 执行上下文 │ └── state.go # 状态管理 ├── nodes/ # 节点类型 │ ├── node.go # 节点接口 │ ├── llm.go # LLM 调用节点 │ ├── condition.go # 条件分支节点 │ ├── loop.go # 循环节点 │ ├── http.go # HTTP 请求节点 │ ├── code.go # 代码执行节点 │ ├── rag.go # RAG 检索节点 │ ├── mcp.go # MCP 工具节点 │ ├── input.go # 输入节点 │ ├── output.go # 输出节点 │ └── transform.go # 数据转换节点 ├── ai/ # AI 自动生成 │ ├── generator.go # 工作流生成器 │ ├── optimizer.go # 工作流优化 │ ├── analyzer.go # 需求分析 │ └── templates.go # 模板库 └── storage/ # 工作流存储 ├── repository.go # 存储接口 ├── version.go # 版本管理 └── export.go # 导入导出
type Workflow struct { ID string Name string Description string Version int Nodes []Node Edges []Edge Variables map[string]Variable Settings WorkflowSettings CreatedAt time.Time UpdatedAt time.Time }
type Node struct { ID string Type NodeType Name string Position Position Config map[string]interface{} Inputs []Port Outputs []Port } type NodeType string const ( NodeTypeLLM NodeType = "llm" NodeTypeCondition NodeType = "condition" NodeTypeLoop NodeType = "loop" NodeTypeHTTP NodeType = "http" NodeTypeCode NodeType = "code" NodeTypeRAG NodeType = "rag" NodeTypeMCP NodeType = "mcp" NodeTypeInput NodeType = "input" NodeTypeOutput NodeType = "output" NodeTypeTransform NodeType = "transform" )
type ExecutionContext struct { WorkflowID string ExecutionID string Variables map[string]interface{} NodeStates map[string]NodeState StartTime time.Time Status ExecutionStatus }
你是一个工作流设计专家。根据用户需求生成工作流定义。 用户需求: {user_requirement} 可用节点类型: - llm: LLM 调用,用于文本生成、分析等 - condition: 条件分支,根据条件选择不同路径 - loop: 循环处理,遍历数组或重复执行 - http: HTTP 请求,调用外部 API - code: 代码执行,运行自定义代码 - rag: RAG 检索,从知识库检索相关内容 - mcp: MCP 工具,调用 MCP 服务器工具 请生成 JSON 格式的工作流定义...
节点扩展性
执行可靠性
性能优化