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

Is it possible to support Azure OpenAI? #5

Closed
Stark-X opened this issue Jul 19, 2023 · 6 comments
Closed

Is it possible to support Azure OpenAI? #5

Stark-X opened this issue Jul 19, 2023 · 6 comments

Comments

@Stark-X
Copy link

Stark-X commented Jul 19, 2023

No description provided.

@clemlesne
Copy link

deployment_id and model parameters are required for OpenAI SDK to talk to OpenAI instances on Azure.

The error I have is:

exception=InvalidRequestError(message="Must provide an 'engine' or 'deployment_id' parameter to create a <class 'openai.api_resources.chat_completion.ChatCompletion'>", param='engine', code=None, http_status=None, request_id=None)>

Integration examples:

openai.Embedding.create(
  deployment_id="xxx",
  input=prompt,
  model="xxx",
)

completion = openai.ChatCompletion.create(
  deployment_id="xxx",
  messages=messages,
  model="xxx",
)

Proposed integration:

ChatOpenAI(
  model_name="xxx",
  deployment_id="xxx",
  model="xxx",
)

@EliasGitHub
Copy link

I'm getting the same error @clemlesne . Is there any workaround to let us using Doctran with Azure OpenAI deployments like "gpt-35-turbo"? appreciate any help!!

@maciejwie
Copy link
Contributor

I've created a PR to add Azure OpenAI support: #11

@timxieICN
Copy link

Do we have someone reviewing @maciejwie 's PR above?

@Ayan-Bandyopadhyay
Copy link
Contributor

Merged just now

@yb-sid
Copy link

yb-sid commented Oct 13, 2023

I'm still facing error after installing doctran via pip install doctran:

TypeError: init() got an unexpected keyword argument 'openai_deployment_id'

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

No branches or pull requests

7 participants