mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-05 16:23:43 +08:00
feat: ensure TopP is nil when using extended thinking in Claude request
This commit is contained in:
@@ -65,6 +65,12 @@ func ConvertRequest(textRequest model.GeneralOpenAIRequest) *Request {
|
|||||||
Tools: claudeTools,
|
Tools: claudeTools,
|
||||||
Thinking: textRequest.Thinking,
|
Thinking: textRequest.Thinking,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if claudeRequest.Thinking != nil {
|
||||||
|
// top_p must be nil when using extended thinking
|
||||||
|
claudeRequest.TopP = nil
|
||||||
|
}
|
||||||
|
|
||||||
if len(claudeTools) > 0 {
|
if len(claudeTools) > 0 {
|
||||||
claudeToolChoice := struct {
|
claudeToolChoice := struct {
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
|
|||||||
Reference in New Issue
Block a user