jekalmin / extended_openai_conversation

Home Assistant custom component of conversation agent. It uses OpenAI to control your devices.
964 stars 136 forks source link

Support azure openai? #42

Closed AsafMah closed 10 months ago

AsafMah commented 11 months ago

Azure openai has the same features but a bit of a different url scheme

https://github.com/joselcaguilar/azure-openai-ha

jekalmin commented 11 months ago

Thanks for a suggestion.

According to documentation, it would not be hard to integrate Azure openai at this moment since specs seems about the same. I will probably try this in the near future.

jekalmin commented 11 months ago

Could you help me implement this feature? If I release a beta version, could you test if Azure API works?

jekalmin commented 11 months ago

I released in 0.0.10-beta2. Could you try it and give a feedback?

https://github.com/jekalmin/extended_openai_conversation/pull/48#issuecomment-1868459941

AsafMah commented 11 months ago

confirmed working!

jekalmin commented 10 months ago

Thanks for trying it! It's released in 0.0.10.

Let me close the issue, and feel free to reopen the issue.

jekalmin commented 10 months ago

@AsafMah If you have upgraded HA-core version to 2024.1.x, could you try 1.0.0-beta1? There were many changes and I haven't tested Azure API yet.

mateuszdrab commented 9 months ago

@AsafMah could you share what base url you're using? I'm getting 404 when I use https://{resource-name}.openai.azure.com/ as base url with API version 2023-07-01-preview/2023-03-15-preview

AsafMah commented 9 months ago

you need to skip the validation and it should work after, so you as long as the right model is set

mateuszdrab commented 9 months ago

Ok I got it to work, I had to deploy a gpt-3.5-turbo-1106 model and reference it's name in the model field in the integration's configuration page.