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

Upgrade the authentication environment variable for AzureChatOpenAIProvider #690

Closed
aroffe99 opened this issue Mar 15, 2024 · 2 comments
Closed
Labels
enhancement New feature or request

Comments

@aroffe99
Copy link
Contributor

Problem

When using openai>1.0.0 for Azure, the environment variable preferred is AZURE_OPENAI_API_KEY instead of OPENAI_API_KEY. To be compliant with this extension and also the code in https://python.langchain.com/docs/integrations/chat/azure_chat_openai -- and using the existing environment variables in the lab pod instead of hard coding them in the config - both AZURE_OPENAI_API_KEY and OPENAI_API_KEY are needed.

Proposed Solution

Replace the auth_strategy for AzureChatOpenAIProvider

auth_strategy = EnvAuthStrategy(name="OPENAI_API_KEY")
to use AZURE_OPENAI_API_KEY

Additional context

@aroffe99 aroffe99 added the enhancement New feature or request label Mar 15, 2024
Copy link

welcome bot commented Mar 15, 2024

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@dlqqq
Copy link
Member

dlqqq commented Mar 26, 2024

Fixed by #691.

@dlqqq dlqqq closed this as completed Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants