Skip to content

Commit

Permalink
feat: claude response return model name
Browse files Browse the repository at this point in the history
  • Loading branch information
Calcium-Ion committed Sep 11, 2024
1 parent d168a68 commit 2650ec9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions dto/text_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ type OpenAITextResponseChoice struct {

type OpenAITextResponse struct {
Id string `json:"id"`
Model string `json:"model"`
Object string `json:"object"`
Created int64 `json:"created"`
Choices []OpenAITextResponseChoice `json:"choices"`
Expand Down
1 change: 1 addition & 0 deletions relay/channel/claude/relay-claude.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ func ResponseClaude2OpenAI(reqMode int, claudeResponse *ClaudeResponse) *dto.Ope
if len(tools) > 0 {
choice.Message.ToolCalls = tools
}
fullTextResponse.Model = claudeResponse.Model
choices = append(choices, choice)
fullTextResponse.Choices = choices
return &fullTextResponse
Expand Down

0 comments on commit 2650ec9

Please sign in to comment.