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

Azure OpenAI as Provider #245

Closed
sqlreport opened this issue Jun 28, 2023 · 8 comments · Fixed by #322
Closed

Azure OpenAI as Provider #245

sqlreport opened this issue Jun 28, 2023 · 8 comments · Fixed by #322
Labels
enhancement New feature or request @jupyter-ai/core
Milestone

Comments

@sqlreport
Copy link

Problem

  • how do I use Azure Open AI as provider, I do not see the Azure Open AI listed on provider list

Proposed Solution

  • can we get a documentation on adding different provider?

Additional context

@sqlreport sqlreport added the enhancement New feature or request label Jun 28, 2023
@3coins
Copy link
Collaborator

3coins commented Jun 29, 2023

@sqlreport
Thanks for your interest in Jupyter AI. We will add more documentation on adding new providers. To get you started, please feel free to submit a PR for adding a new provider in the providers.py file. We can help review or answer code related questions in the PR.

For some reference, here is the provider implementation for ChatOpenAI:

class ChatOpenAINewProvider(BaseProvider, ChatOpenAI):
id = "openai-chat-new"
name = "OpenAI"
models = [
"gpt-4",
"gpt-4-0314",
"gpt-4-32k",
"gpt-4-32k-0314",
"gpt-3.5-turbo",
"gpt-3.5-turbo-0301",
]
model_id_key = "model_name"
pypi_package_deps = ["openai"]
auth_strategy = EnvAuthStrategy(name="OPENAI_API_KEY")

All providers in Jupyter AI should extend from Langchain LLM class. Here is the LLM class in Langchain, that can help you with required attributes for creating this provider.
https://github.com/hwchase17/langchain/blob/v0.0.159/langchain/llms/openai.py#L562

@VectorZhao
Copy link

+1

@c4fun
Copy link

c4fun commented Aug 3, 2023

Please consider this function as most corporations tend to use Azure OpenAI rather than OpenAI

@qianchen94
Copy link

+1

@3coins
Copy link
Collaborator

3coins commented Aug 4, 2023

@sqlreport @VectorZhao @c4fun @qianchen94
Thanks for your interest in Jupyter AI. We can work to add AzureChatOpenAI provider but will need your help in verifying once we submit the PR. Would any of you be able to help with this?

@wanbao118
Copy link

I can help to test if the Azure OpenAI provider is available.

@klauern
Copy link

klauern commented Aug 6, 2023

Related, is it possible to just override the OPENAI_API_BASE environment variable? We have a proxy service that we are required to use that has it's own API keys. If I could just point to our proxy, I could use the OOTB OpenAI models

@dlqqq
Copy link
Member

dlqqq commented Aug 8, 2023

Hey folks, I authored a PR that should add support for Azure OpenAI. Can anybody help verify the PR? None of us have an Azure OpenAI account. I've included replication steps as a comment on the PR.

@JasonWeill JasonWeill modified the milestones: Future, 2.1.0 Release Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request @jupyter-ai/core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants