mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-27 13:46:37 +08:00
sonnet 3.7 update
adding the thinking parameter toggle.
This commit is contained in:
parent
95f998110f
commit
a5a8b1cd0f
@ -40,6 +40,10 @@ export interface AnthropicChatRequest {
|
|||||||
top_k?: number; // Only sample from the top K options for each subsequent token.
|
top_k?: number; // Only sample from the top K options for each subsequent token.
|
||||||
metadata?: object; // An object describing metadata about the request.
|
metadata?: object; // An object describing metadata about the request.
|
||||||
stream?: boolean; // Whether to incrementally stream the response using server-sent events.
|
stream?: boolean; // Whether to incrementally stream the response using server-sent events.
|
||||||
|
thinking?: {
|
||||||
|
type: "enabled" | "disabled";
|
||||||
|
budget_tokens: number;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ChatRequest {
|
export interface ChatRequest {
|
||||||
@ -189,6 +193,10 @@ export class ClaudeApi implements LLMApi {
|
|||||||
top_p: modelConfig.top_p,
|
top_p: modelConfig.top_p,
|
||||||
// top_k: modelConfig.top_k,
|
// top_k: modelConfig.top_k,
|
||||||
top_k: 5,
|
top_k: 5,
|
||||||
|
thinking: {
|
||||||
|
type: "enabled",
|
||||||
|
budget_tokens: modelConfig.max_tokens - 1, // Default value from example
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const path = this.path(Anthropic.ChatPath);
|
const path = this.path(Anthropic.ChatPath);
|
||||||
|
@ -535,6 +535,7 @@ const anthropicModels = [
|
|||||||
"claude-3-5-sonnet-20240620",
|
"claude-3-5-sonnet-20240620",
|
||||||
"claude-3-5-sonnet-20241022",
|
"claude-3-5-sonnet-20241022",
|
||||||
"claude-3-5-sonnet-latest",
|
"claude-3-5-sonnet-latest",
|
||||||
|
"claude-3-7-sonnet-20250219",
|
||||||
];
|
];
|
||||||
|
|
||||||
const baiduModels = [
|
const baiduModels = [
|
||||||
|
Loading…
Reference in New Issue
Block a user