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