Commit 891100dc by t0ng7u

Merge remote-tracking branch 'origin/alpha' into alpha

parents 4da43710 61601d38
...@@ -110,7 +110,7 @@ func (c *ChatCompletionsStreamResponseChoiceDelta) GetReasoningContent() string ...@@ -110,7 +110,7 @@ func (c *ChatCompletionsStreamResponseChoiceDelta) GetReasoningContent() string
func (c *ChatCompletionsStreamResponseChoiceDelta) SetReasoningContent(s string) { func (c *ChatCompletionsStreamResponseChoiceDelta) SetReasoningContent(s string) {
c.ReasoningContent = &s c.ReasoningContent = &s
c.Reasoning = &s //c.Reasoning = &s
} }
type ToolCallResponse struct { type ToolCallResponse struct {
......
...@@ -935,7 +935,7 @@ func GeminiChatStreamHandler(c *gin.Context, info *relaycommon.RelayInfo, resp * ...@@ -935,7 +935,7 @@ func GeminiChatStreamHandler(c *gin.Context, info *relaycommon.RelayInfo, resp *
} }
} }
} }
logger.LogDebug(c, fmt.Sprintf("info.SendResponseCount = %d", info.SendResponseCount))
if info.SendResponseCount == 0 { if info.SendResponseCount == 0 {
// send first response // send first response
emptyResponse := helper.GenerateStartEmptyResponse(id, createAt, info.UpstreamModelName, nil) emptyResponse := helper.GenerateStartEmptyResponse(id, createAt, info.UpstreamModelName, nil)
...@@ -953,6 +953,11 @@ func GeminiChatStreamHandler(c *gin.Context, info *relaycommon.RelayInfo, resp * ...@@ -953,6 +953,11 @@ func GeminiChatStreamHandler(c *gin.Context, info *relaycommon.RelayInfo, resp *
if response.IsFinished() { if response.IsFinished() {
response.Choices[0].FinishReason = nil response.Choices[0].FinishReason = nil
} }
} else {
err = handleStream(c, info, emptyResponse)
if err != nil {
logger.LogError(c, err.Error())
}
} }
} }
......
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