Skip to content

Commit e06565a

Browse files
authored
Merge pull request alexrudall#473 from drnic/remove-warning-no-org
If being used for Groq, skip OpenAI-Organization header
2 parents 7c2c095 + cdf9318 commit e06565a

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010
/test/tmp/
1111
/test/version_tmp/
1212
/tmp/
13-
/.bundle/
14-
/.yardoc
15-
/_yardoc/
16-
/doc/
17-
1813

1914
# Used by dotenv library to load environment variables.
2015
.env

lib/openai/http_headers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def openai_headers
1919
"Content-Type" => "application/json",
2020
"Authorization" => "Bearer #{@access_token}",
2121
"OpenAI-Organization" => @organization_id
22-
}
22+
}.compact
2323
end
2424

2525
def azure_headers

spec/openai/client/http_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@
263263

264264
it {
265265
expect(headers).to eq({ "Authorization" => "Bearer #{OpenAI.configuration.access_token}",
266-
"Content-Type" => "application/json", "OpenAI-Organization" => nil })
266+
"Content-Type" => "application/json" })
267267
}
268268

269269
describe "with Azure" do

0 commit comments

Comments
 (0)