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

fix(openai): Check configuration.apiKey in ChatOpenAI constructor #6664

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

ezra-chu
Copy link
Contributor

@ezra-chu ezra-chu commented Aug 30, 2024

OpenAI SDK's ClientOptions includes apiKey. It looks like @langchain/openai's ChatOpenAI constructor does not honor that field.

image

Referenced in the docs here.

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Aug 30, 2024
Copy link

vercel bot commented Aug 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview Aug 30, 2024 6:14pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Aug 30, 2024 6:14pm

@ezra-chu ezra-chu changed the title Check configuration.apiKey Check configuration.apiKey in ChatOpenAI constructor Aug 30, 2024
@dosubot dosubot bot added the auto:bug Related to a bug, vulnerability, unexpected error with an existing feature label Aug 30, 2024
Copy link
Collaborator

@jacoblee93 jacoblee93 left a comment

Choose a reason for hiding this comment

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

Thank you! Apologies for the delay.

@dosubot dosubot bot added the lgtm PRs that are ready to be merged as-is label Sep 4, 2024
@jacoblee93 jacoblee93 changed the title Check configuration.apiKey in ChatOpenAI constructor fix(openai): Check configuration.apiKey in ChatOpenAI constructor Sep 4, 2024
@jacoblee93 jacoblee93 merged commit 40b85da into langchain-ai:main Sep 4, 2024
34 checks passed
@langchain-ai langchain-ai locked as spam and limited conversation to collaborators Oct 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature lgtm PRs that are ready to be merged as-is size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants