fix(chat): support reasoning content in streaming responses for vLLM models
- Parse reasoning field together with standard stream response using local struct - Unify reasoning content extraction from standard and vLLM response paths - Adapt processStreamDelta to accept reasoning content as a separate parameter - Send reasoning content as thinking response in the stream when available - Ensure compatibility with existing SDK logic by constructing standard choice object
This commit is contained in:
@@ -78,5 +78,6 @@ func (c *GenericChat) customizeRequest(req *openai.ChatCompletionRequest, opts *
|
||||
req.ChatTemplateKwargs = map[string]interface{}{
|
||||
"enable_thinking": thinking,
|
||||
}
|
||||
return nil, false // 使用标准请求(已修改)
|
||||
|
||||
return req, true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user