fix: trim gen2D slide content to prevent overflow beyond header/footer
Deploy Slides / build-and-deploy (push) Successful in 1m16s

- Reduce Item count per slide: pipeline 4→3, solution 4→2, highlights 6→4
- Remove tech-stack architecture layering Item (moved to tech-stack grid)
- Simplify eino-graph: shorter Go code, 3 Items→2
- Simplify prompt-agent: smaller mermaid, shorter Item text
- Simplify async-task: merge 3 Items→2, remove footer
- Simplify data-model: merge 4 grid items→2
- Simplify architecture: reduce ASCII diagram from 38 to 20 lines
- Simplify dedup-ws: remove JSON code block, shorter Items
- Simplify deployment: smaller mermaid, shorter Items
- Simplify problem: shorter Item text, remove bullet lists
- Simplify style-system: fix typo, shorter Item text
This commit is contained in:
2026-05-30 14:43:23 +08:00
parent d479504f12
commit 19075592e5
13 changed files with 116 additions and 300 deletions
+6 -22
View File
@@ -1,27 +1,19 @@
# Eino 管线编排 — compose.Graph
四阶段智能体协作的核心实现
<div class="mt-2">
```go {all|1-8|10-15|17-22|24-28}
// 类型定义
```go
type PipelineInput struct {
UserID string
ProjectID string
TaskID string
Prompt string
AssetType string
StyleMap map[string]string
UserID, ProjectID, TaskID string
Prompt, AssetType string
StyleMap map[string]string
}
type PipelineState struct {
OptimizedPrompt string
ImageURL string
QualityPassed bool
RetryCount int
}
type PipelineOutput struct {
AssetURL string
Metadata map[string]any
@@ -30,18 +22,10 @@ type PipelineOutput struct {
</div>
<v-clicks>
<Item title="graph.Build() — 构建管线">
使用 `compose.NewGraph[PipelineInput, PipelineOutput]()` 创建有向图,依次注册四个节点:PromptOptimizer → AssetGenerator → QualitySupervisor → FormatAdapter。质检节点支持条件分支:通过则进入格式适配,不通过则回退到提示词优化。
</Item>
<Item title="stateHandler — 状态管理">
通过 `AddLambda` 注册状态处理器,在节点间传递优化后的提示词、图片 URL、重试计数等状态。质检节点根据 `RetryCount` 决定重优化还是降级输出。
`compose.NewGraph` 创建有向图,注册四节点。质检节点条件分支:通过 → 格式适配,不通过 → 回退提示词优化。
</Item>
<Item title="graph.Invoke() — 执行管线">
传入 `PipelineInput`,管线自动按拓扑顺序执行各节点。每个节点执行完成后通过回调更新进度(5% → 25% → 60% → 80% → 100%)。
传入 `PipelineInput`,按拓扑顺序执行。每节点完成回调更新进度(5% → 25% → 60% → 80% → 100%)。
</Item>
</v-clicks>