langchainjs
langchainjs copied to clipboard
Do we have any plan for Azure OpenAI?
So you can do that already. When you create a model, you can pass in a ConfigurationParams
as a second argument on the constructor:
const model = new OpenAI({temperature: 0}, {basePath: '<your-azure-endpoint>'})
Hi @amoreaulemay, did you make it work? Looks like langchainjs is using the openai package and the issue there is still not resolved https://github.com/openai/openai-node/issues/53 . Also, the header for azure are not the same for auth the request to there models (api-key for azure, Authorization/Bearer token for openai).
Sorry @bxav you're right. I based this off Helicone which acts as a proxy and assumed azure used the same request schema