mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-27 05:36:39 +08:00
sonnet 3.7 process thinking
This commit is contained in:
parent
0ccf309519
commit
71d9235cac
@ -241,9 +241,10 @@ export class ClaudeApi implements LLMApi {
|
||||
name: string;
|
||||
};
|
||||
delta?: {
|
||||
type: "text_delta" | "input_json_delta";
|
||||
type: "text_delta" | "input_json_delta" | "thinking_delta";
|
||||
text?: string;
|
||||
partial_json?: string;
|
||||
thinking?: string;
|
||||
};
|
||||
index: number;
|
||||
};
|
||||
@ -270,6 +271,9 @@ export class ClaudeApi implements LLMApi {
|
||||
runTools[index]["function"]["arguments"] +=
|
||||
chunkJson?.delta?.partial_json;
|
||||
}
|
||||
if (chunkJson?.delta?.type === "thinking_delta" && chunkJson?.delta?.thinking) {
|
||||
return `🧠 ${chunkJson.delta.thinking}`;
|
||||
}
|
||||
return chunkJson?.delta?.text;
|
||||
},
|
||||
// processToolMessage, include tool_calls message and tool call results
|
||||
|
Loading…
Reference in New Issue
Block a user