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

Allow for specifying the organization id in the configuration #364

Merged
merged 2 commits into from Dec 18, 2023

Conversation

edeandrea
Copy link
Contributor

@edeandrea edeandrea commented Dec 18, 2023

Allow the organizationId to be specified in the configuration. See https://platform.openai.com/docs/api-reference/organization-optional

Right now there is no way to specify this.

I added a .organizationId(System.getenv("OPENAI_ORGANIZATION_ID")) to the builders in a bunch of the tests. They should have no effect other than if you want to run the tests to pass an organizationId, you can just set the OPENAI_ORGANIZATION_ID environment variable. The OpenAiClient won't do anything if the organizationId is null.

Happy for questions/comments.

Fixes #344

Copy link
Owner

@langchain4j langchain4j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edeandrea awesome, thank you!

@langchain4j langchain4j merged commit c2ab781 into langchain4j:main Dec 18, 2023
6 checks passed
@edeandrea edeandrea deleted the allow-organizationId branch December 18, 2023 16:02
@edeandrea
Copy link
Contributor Author

@langchain4j happy to help! Once this is released I'll then pull it into quarkiverse/quarkus-langchain4j#131

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.

[FEATURE] - Allow for specifying the organization id in the configuration
2 participants