mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-19 01:27:28 +00:00
fix(adaptor): missing first text delta while convert OpenAI to Claude
This commit is contained in:
@@ -248,9 +248,10 @@ func StreamResponseOpenAI2Claude(openAIResponse *dto.ChatCompletionsStreamRespon
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
claudeResponses = append(claudeResponses, &dto.ClaudeResponse{
|
claudeResponses = append(claudeResponses, &dto.ClaudeResponse{
|
||||||
Type: "content_block_delta",
|
Index: &info.ClaudeConvertInfo.Index,
|
||||||
|
Type: "content_block_delta",
|
||||||
Delta: &dto.ClaudeMediaMessage{
|
Delta: &dto.ClaudeMediaMessage{
|
||||||
Type: "text",
|
Type: "text_delta",
|
||||||
Text: common.GetPointer[string](openAIResponse.Choices[0].Delta.GetContentString()),
|
Text: common.GetPointer[string](openAIResponse.Choices[0].Delta.GetContentString()),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user