Skip to content

Commit

Permalink
Update client.go - allow to skip Authorization header (#658)
Browse files Browse the repository at this point in the history
* Update client.go - allow to skip Authorization header

* Update client.go
  • Loading branch information
7flash authored Feb 16, 2024
1 parent ff61bbb commit 69e3bbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (c *Client) setCommonHeaders(req *http.Request) {
// Azure API Key authentication
if c.config.APIType == APITypeAzure {
req.Header.Set(AzureAPIKeyHeader, c.config.authToken)
} else {
} else if c.config.authToken != "" {
// OpenAI or Azure AD authentication
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", c.config.authToken))
}
Expand Down

0 comments on commit 69e3bbb

Please sign in to comment.