Skip to content

Commit

Permalink
🔖 chore: Support for Claude 8k
Browse files Browse the repository at this point in the history
  • Loading branch information
MartialBE committed Jul 16, 2024
1 parent 5ded841 commit 5503893
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions providers/claude/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ func (p *ClaudeProvider) getChatRequest(request *types.ChatCompletionRequest) (*
headers["Accept"] = "text/event-stream"
}

if strings.HasPrefix(request.Model, "claude-3-5-sonnet") {
headers["anthropic-beta"] = "max-tokens-3-5-sonnet-2024-07-15"
}

claudeRequest, errWithCode := ConvertFromChatOpenai(request)
if errWithCode != nil {
return nil, errWithCode
Expand Down

0 comments on commit 5503893

Please sign in to comment.