langchainjs icon indicating copy to clipboard operation
langchainjs copied to clipboard

Do we have any plan for Azure OpenAI?

Open baobo5625 opened this issue 1 year ago • 4 comments

baobo5625 avatar Apr 19 '23 08:04 baobo5625

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>'})

amoreaulemay avatar Apr 20 '23 08:04 amoreaulemay

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).

bxav avatar Apr 20 '23 09:04 bxav

Sorry @bxav you're right. I based this off Helicone which acts as a proxy and assumed azure used the same request schema

amoreaulemay avatar Apr 20 '23 10:04 amoreaulemay