补上“原生工具阶段”的 thought 读取逻辑:现在会优先读 response.Thought(reasoning_content/thought/reasoning),没有再回退解析 content 里的 thought JSON,然后写入思考 UI。
文件:AIIntelligenceCore.cs、SimpleAIClient.cs
This commit is contained in:
@@ -50,6 +50,7 @@ namespace WulaFallenEmpire.EventSystem.AI
|
||||
{
|
||||
public string Content;
|
||||
public List<ToolCallRequest> ToolCalls;
|
||||
public string Thought;
|
||||
}
|
||||
|
||||
public class SimpleAIClient
|
||||
@@ -435,10 +436,14 @@ namespace WulaFallenEmpire.EventSystem.AI
|
||||
}
|
||||
|
||||
string content = TryGetString(message, "content");
|
||||
string thought = TryGetString(message, "reasoning_content");
|
||||
if (string.IsNullOrWhiteSpace(thought)) thought = TryGetString(message, "thought");
|
||||
if (string.IsNullOrWhiteSpace(thought)) thought = TryGetString(message, "reasoning");
|
||||
var result = new ChatCompletionResult
|
||||
{
|
||||
Content = content,
|
||||
ToolCalls = ParseToolCalls(message)
|
||||
ToolCalls = ParseToolCalls(message),
|
||||
Thought = thought
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user