File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -219,9 +219,9 @@ public void StopCurrentRequest()
219219 #region 提示词构建
220220
221221 /// <summary>
222- /// 构建 Agent 指令(优化版本 )
223- /// ✅ 移除手动 ReAct 循环指令(框架自动处理工具调用机制)
224- /// ✅ 保留必要的输出格式约束(ReAct 文本格式需通过提示词引导)
222+ /// 构建 Agent 指令(ReAct 模式 )
223+ /// ✅ 通过提示词引导 Thought-Action-Observation 循环
224+ /// ✅ 保留最终输出格式约束
225225 /// </summary>
226226 private string BuildAgentInstructions ( )
227227 {
@@ -232,6 +232,16 @@ private string BuildAgentInstructions()
232232当前关注标的:{ stockInfo }
233233</role>
234234
235+ <react>
236+ 你必须使用 ReAct 模式完成任务,循环格式如下:
237+ Thought: [思考,必须包含:已有信息、缺失信息、工具选择理由、参数准备、逻辑连贯性]
238+ Action: [调用工具及参数]
239+ Observation: [工具返回结果]
240+
241+ 当信息充足时结束循环并输出:
242+ Final Answer: [完整、最终的答案,不允许以问句结尾]
243+ </react>
244+
235245<capabilities>
236246你可以调用工具完成分析任务:
237247- 基础数据:价格、K线、市值、成交量
Original file line number Diff line number Diff line change @@ -38,7 +38,10 @@ public void Setup()
3838 [ TestCleanup ]
3939 public void Cleanup ( )
4040 {
41- _serviceProvider ? . Dispose ( ) ;
41+ if ( _serviceProvider != null )
42+ {
43+ _serviceProvider . Dispose ( ) ;
44+ }
4245 }
4346
4447 #region A股新闻数据测试
You can’t perform that action at this time.
0 commit comments