mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-19 01:56:37 +08:00
feat: ensure TopP is nil when using extended thinking in Claude request
This commit is contained in:
parent
56a1c52240
commit
8d3a6b5cb9
@ -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"`
|
||||||
|
Loading…
Reference in New Issue
Block a user