Azure OpenAI Conversation

Hey there!

I would like to share with you the Azure OpenAI Conversation integration :partying_face:

The Azure OpenAI Conversation integration for Home Assistant has been previously requested by some users with its powerful features in terms of privacy, advanced security, and ease of use, it’s sure to be a hit :star2:

So how does it work? It is based on the official OpenAI Conversation integration, I have modified the code to work with Azure OpenAI (tested with GPT3.5 and GPT4 with Home Assistant 2023.4.x).

English, Spanish, German, French and Dutch are the UI Languages supported, but more translations are welcome, so please do not hesitate to open a Pull Request if needed :world_map:

For more information, take a look to the azure-openai-ha repo on GitHub :face_with_monocle:

Thanks in advance for your support!

still working? im unable to use it;( error at the moment to put the info of the api and other info

Hi Nash16. Thanks for releasing a 2.00 update to the Azure OpenAI Integration! Kinda new to Azure OpenAI and think I got it configured in Azure

Within the Azure AI Foundry, I do see a deployment.

I think I got it right, but then took the keys and API

And put those into the Configuration of the Custom Integration and put the Api Version as what was in the Foundry Deployment.

Seems all pretty straightforward.

In Assistants, I changed the Conversation Agent from Home Assistant to Azure Open AI Conversation

And left the default option of the Conversation Agent

But when I try a Conversation, doesn’t seem to work.

I wait about 5 minutes and check Azure Monitoring Metrics - Azure OpenAI Requests and see no requests (the requests you see are me playing around in Foundary)

Network - Firewall and virtual networks are configured to allow.

In terms of Core Logs, not much, but I do see:

Logger: custom_components.azure_openai_conversation
Source: custom_components/azure_openai_conversation/conversation.py:274
integration: Azure OpenAI Conversation (documentation, issues)
First occurred: 5:04:06 PM (1 occurrences)
Last logged: 5:04:06 PM

Error talking to Azure OpenAI: Error code: 429 - {‘error’: {‘code’: ‘429’, ‘message’: ‘Requests to the ChatCompletions_Create Operation under Azure OpenAI API version 2024-08-01-preview have exceeded token rate limit of your current OpenAI S0 pricing tier. Please retry after 86400 seconds. Please go here: Dynamics 365 Customer Voice if you would like to further increase the default rate limit.’}}

and

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:324
First occurred: 5:13:43 PM (1 occurrences)
Last logged: 5:13:43 PM

Detected that custom integration ‘azure_openai_conversation’ sets option flow config_entry explicitly, which is deprecated at custom_components/azure_openai_conversation/config_flow.py, line 152: self.config_entry = config_entry. This will stop working in Home Assistant 2025.12, please create a bug report at GitHub · Where software is built

But nothing else showing failure. Any thoughts?

You may check this if it helps. :smiley: