Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Project ID #766

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pkosiec
Copy link
Contributor

@pkosiec pkosiec commented Jun 10, 2024

Describe the change
Please provide a clear and concise description of the changes you're proposing. Explain what problem it solves or what feature it adds.

Provide OpenAI documentation link
https://platform.openai.com/docs/api-reference/organizations-and-projects-optional

Describe your solution
I've added an optional header, same as the Organization ID.

As @massenz mentioned here, while the Project ID it is optional, it would be great to match the official OpenAI client and have a double check for the project scope.

Tests
I've tested the changes manually.

Resolves #757

Copy link

codecov bot commented Jun 10, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 98.51%. Comparing base (774fc9d) to head (a666b26).
Report is 18 commits behind head on master.

Files Patch % Lines
client.go 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #766      +/-   ##
==========================================
+ Coverage   98.46%   98.51%   +0.05%     
==========================================
  Files          24       24              
  Lines        1364     1143     -221     
==========================================
- Hits         1343     1126     -217     
+ Misses         15       10       -5     
- Partials        6        7       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@massenz
Copy link

massenz commented Jun 16, 2024

Thanks for the patch!
The change looks good to me ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ClientConfig should support a ProjectID
2 participants