feat: add support for extended reasoning in Claude 3.7 model

This commit is contained in:
Laisky.Cai
2025-02-25 02:57:37 +00:00
parent 95527d76ef
commit 3a8924d7af
4 changed files with 54 additions and 6 deletions

View File

@@ -73,6 +73,16 @@ type GeneralOpenAIRequest struct {
// -------------------------------------
Provider *openrouter.RequestProvider `json:"provider,omitempty"`
IncludeReasoning *bool `json:"include_reasoning,omitempty"`
// -------------------------------------
// Anthropic
// -------------------------------------
Thinking *Thinking `json:"thinking,omitempty"`
}
// https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking#implementing-extended-thinking
type Thinking struct {
Type string `json:"type"`
BudgetTokens int `json:"budget_tokens" binding:"omitempty,min=1024"`
}
func (r GeneralOpenAIRequest) ParseInput() []string {