mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-18 00:16:37 +08:00
feat: claude response return model name
This commit is contained in:
parent
d168a685c1
commit
2650ec9b59
@ -34,6 +34,7 @@ type OpenAITextResponseChoice struct {
|
|||||||
|
|
||||||
type OpenAITextResponse struct {
|
type OpenAITextResponse struct {
|
||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
|
Model string `json:"model"`
|
||||||
Object string `json:"object"`
|
Object string `json:"object"`
|
||||||
Created int64 `json:"created"`
|
Created int64 `json:"created"`
|
||||||
Choices []OpenAITextResponseChoice `json:"choices"`
|
Choices []OpenAITextResponseChoice `json:"choices"`
|
||||||
|
@ -341,6 +341,7 @@ func ResponseClaude2OpenAI(reqMode int, claudeResponse *ClaudeResponse) *dto.Ope
|
|||||||
if len(tools) > 0 {
|
if len(tools) > 0 {
|
||||||
choice.Message.ToolCalls = tools
|
choice.Message.ToolCalls = tools
|
||||||
}
|
}
|
||||||
|
fullTextResponse.Model = claudeResponse.Model
|
||||||
choices = append(choices, choice)
|
choices = append(choices, choice)
|
||||||
fullTextResponse.Choices = choices
|
fullTextResponse.Choices = choices
|
||||||
return &fullTextResponse
|
return &fullTextResponse
|
||||||
|
Loading…
Reference in New Issue
Block a user