补上“原生工具阶段”的 thought 读取逻辑:现在会优先读 response.Thought(reasoning_content/thought/reasoning),没有再回退解析 content 里的 thought JSON,然后写入思考 UI。

文件:AIIntelligenceCore.cs、SimpleAIClient.cs
This commit is contained in:
2026-01-02 14:50:35 +08:00
parent 57f4ecd494
commit 333a4890eb
5 changed files with 123 additions and 9256 deletions

View File

@@ -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;
}