Skip to content

Commit 6f1c052

Browse files
committed
[fix]: 纵向排列
1 parent c578e49 commit 6f1c052

File tree

1 file changed

+53
-29
lines changed

1 file changed

+53
-29
lines changed

app/api/v1/endpoints/aichat.py

Lines changed: 53 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -92,35 +92,59 @@ async def generate_graph(
9292
text += f"标题: {note.title}\n" if note.title else ""
9393
text += note.content if note.content else ""
9494
text += """
95-
我需要你对于上面的内容生成思维导图,请仅给我返回mermaid代码,不要有其他内容,下面是生成样例,
96-
graph TD
97-
A[Natural Language Navigation for Service Robots] --> B[Task Definition]
98-
A --> C[Challenges]
99-
A --> D[Proposed Solution]
100-
A --> E[Experimental Results]
101-
102-
B --> B1["- Predict action sequence from NL instructions"]
103-
B --> B2["- Example: 'Walk out of bathroom to right stairs'"]
104-
105-
C --> C1["- Environment exploration"]
106-
C --> C2["- Accurate path following"]
107-
C --> C3["- Language-vision relationship modeling"]
108-
109-
D --> D1[CrossMap Transformer Network]
110-
D --> D2[Transformer-based Speaker]
111-
D --> D3[Double Back-Translation Model]
112-
113-
D1 --> D11["- Encodes linguistic/visual features"]
114-
D1 --> D12["- Sequentially generates paths"]
115-
116-
D2 --> D21["- Generates navigation instructions"]
117-
118-
D3 --> D31["- Paths → Instructions"]
119-
D3 --> D32["- Instructions → Paths"]
120-
D3 --> D33["- Shared latent features"]
121-
122-
E --> E1["- Improved instruction understanding"]
123-
E --> E2["- Enhanced instruction generation"
95+
我需要你对于上面的内容生成思维导图,请仅给我返回mermaid代码,不要有其他内容,请保证每个连通子图竖向排列,下面是生成样例,
96+
graph TD
97+
A[机器学习项目] --> B[数据收集]
98+
A --> C[数据预处理]
99+
A --> D[特征工程]
100+
A --> E[模型选择]
101+
A --> F[模型训练]
102+
A --> G[模型评估]
103+
A --> H[模型部署]
104+
105+
subgraph 数据预处理
106+
C1[处理缺失值] --> C2[处理异常值]
107+
C2 --> C3[数据标准化]
108+
C3 --> C4[数据编码]
109+
end
110+
111+
subgraph 特征工程
112+
D1[特征选择] --> D2[特征提取]
113+
D2 --> D3[特征构造]
114+
D3 --> D4[特征缩放]
115+
end
116+
117+
subgraph 模型选择
118+
E1[线性回归] --> E2[决策树]
119+
E2 --> E3[支持向量机]
120+
E3 --> E4[神经网络]
121+
end
122+
123+
subgraph 模型训练
124+
F1[划分训练集和验证集] --> F2[选择损失函数]
125+
F2 --> F3[选择优化算法]
126+
F3 --> F4[训练模型]
127+
end
128+
129+
subgraph 模型评估
130+
G1[计算准确率] --> G2[计算召回率]
131+
G2 --> G3[计算F1分数]
132+
G3 --> G4[绘制混淆矩阵]
133+
end
134+
135+
subgraph 模型部署
136+
H1[模型保存] --> H2[选择部署平台]
137+
H2 --> H3[模型集成]
138+
H3 --> H4[模型监控]
139+
H4 --> H5[模型更新]
140+
end
141+
142+
B --> 数据预处理
143+
C --> 特征工程
144+
D --> 模型选择
145+
E --> 模型训练
146+
F --> 模型评估
147+
G --> 模型部署
124148
"""
125149
try:
126150
ans = await kimi_chat([{"role": "user", "content": text}], model="moonshot-v1-32k")

0 commit comments

Comments
 (0)