sonnet 3.7 update

adding the thinking parameter toggle.
This commit is contained in:
richardclim 2025-02-26 00:41:58 -05:00
parent 95f998110f
commit a5a8b1cd0f
2 changed files with 9 additions and 0 deletions

View File

@ -40,6 +40,10 @@ export interface AnthropicChatRequest {
top_k?: number; // Only sample from the top K options for each subsequent token.
metadata?: object; // An object describing metadata about the request.
stream?: boolean; // Whether to incrementally stream the response using server-sent events.
thinking?: {
type: "enabled" | "disabled";
budget_tokens: number;
};
}
export interface ChatRequest {
@ -189,6 +193,10 @@ export class ClaudeApi implements LLMApi {
top_p: modelConfig.top_p,
// top_k: modelConfig.top_k,
top_k: 5,
thinking: {
type: "enabled",
budget_tokens: modelConfig.max_tokens - 1, // Default value from example
},
};
const path = this.path(Anthropic.ChatPath);

View File

@ -535,6 +535,7 @@ const anthropicModels = [
"claude-3-5-sonnet-20240620",
"claude-3-5-sonnet-20241022",
"claude-3-5-sonnet-latest",
"claude-3-7-sonnet-20250219",
];
const baiduModels = [