Commit b6e5ec8c by CaIon

refactor(adaptor): Comment out enable_thinking logic for clarity and future adjustments

parent 0c79519a
...@@ -82,15 +82,15 @@ func (a *Adaptor) ConvertOpenAIRequest(c *gin.Context, info *relaycommon.RelayIn ...@@ -82,15 +82,15 @@ func (a *Adaptor) ConvertOpenAIRequest(c *gin.Context, info *relaycommon.RelayIn
} }
// docs: https://bailian.console.aliyun.com/?tab=api#/api/?type=model&url=2712216 // docs: https://bailian.console.aliyun.com/?tab=api#/api/?type=model&url=2712216
// fix: InternalError.Algo.InvalidParameter: The value of the enable_thinking parameter is restricted to True. // fix: InternalError.Algo.InvalidParameter: The value of the enable_thinking parameter is restricted to True.
if strings.Contains(request.Model, "thinking") { //if strings.Contains(request.Model, "thinking") {
request.EnableThinking = true // request.EnableThinking = true
request.Stream = true // request.Stream = true
info.IsStream = true // info.IsStream = true
} //}
// fix: ali parameter.enable_thinking must be set to false for non-streaming calls //// fix: ali parameter.enable_thinking must be set to false for non-streaming calls
if !info.IsStream { //if !info.IsStream {
request.EnableThinking = false // request.EnableThinking = false
} //}
switch info.RelayMode { switch info.RelayMode {
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment