Skip to content

Commit

Permalink
#183: Pass API version
Browse files Browse the repository at this point in the history
  • Loading branch information
roma-glushko committed Mar 19, 2024
1 parent ba2afc1 commit dfa717a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/providers/anthropic/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ func (c *Client) Chat(ctx context.Context, request *schemas.ChatRequest) (*schem
chatRequest := c.createChatRequestSchema(request)

chatResponse, err := c.doChatRequest(ctx, chatRequest)

if err != nil {
return nil, err
}
Expand Down Expand Up @@ -97,7 +96,7 @@ func (c *Client) doChatRequest(ctx context.Context, payload *ChatRequest) (*sche
}

req.Header.Set("x-api-key", string(c.config.APIKey)) // must be in lower case
req.Header.Set("anthropic-version")
req.Header.Set("anthropic-version", c.apiVersion)
req.Header.Set("Content-Type", "application/json")

// TODO: this could leak information from messages which may not be a desired thing to have
Expand Down

0 comments on commit dfa717a

Please sign in to comment.