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 Support? #244

Closed
HRcode opened this issue Mar 8, 2023 · 10 comments
Closed

Azure OpenAI Support? #244

HRcode opened this issue Mar 8, 2023 · 10 comments

Comments

@HRcode
Copy link

HRcode commented Mar 8, 2023

Unless I'm doing something wrong, it looks like connecting to an OpenAI model through Azure is not supported yet. I've tried to add my deployed Azure model name as a parameter called "deployment_id" (as that works in the Python version of LangChain) but I'm getting an "Incorrect API key provided" error in this version. I also tried "deploymentId", "deploymentID", and "engine" as parameter names.

Are there any plans to support Azure versions of OpenAI models?

@holwerda
Copy link

Was wondering about this too. Started taking a look at how to extend it.

@aaronrogers
Copy link

Is it possible to create a custom LLM to pass into LLMChain? If so, that'd help with this.

I opened a question about this and am hoping for an answer.

@nfcampos
Copy link
Collaborator

@aaronrogers I've now replied to you in the other thread. As for Azure OpenAI support, looks like this is an open issue on the openai-node client, see openai/openai-node#53

@yehudacohen
Copy link

yehudacohen commented Apr 2, 2023

@aaronrogers did you ever build a custom AzureOpenAI model? If so, can you share it as a gist or npm package?

@aaronrogers
Copy link

@yehudacohen, yeah, it's a bit slapped together, but let me see what I can do.

@aaronrogers
Copy link

@yehudacohen, it's not pretty, but it works. Your mileage may vary.
https://gist.github.com/aaronrogers/b6bb28e0e2299e5b96b168e8607a1cc2

@yehudacohen
Copy link

Thanks @aaronrogers , you're a hero!

@HRcode HRcode closed this as completed Apr 4, 2023
@HRcode
Copy link
Author

HRcode commented Apr 4, 2023

Thanks Aaron! Closing this for now. At some point it would be great for this to make it into the official langchainjs package, but I think this provides an onramp for Azure users to build a "custom" LLM for their langchain workflow.

@aaronrogers
Copy link

@HRcode, I agree, it would be nice to add. There's also some additional work that could be done to make the process of creating custom LLMs easier. There were a number of things I still felt like I needed to use from Langchain that weren't exposed, so I had to copy them over.

@thobhanifreddy
Copy link

Ideally, this should not be closed as it is not supported officially.

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

6 participants