๐ญ Iโm a Cloud Consultant working @ Microsoft
I speak Spanish and English as well as:
Find me as @joselcaguilar
Azure OpenAI Conversation for Home Assistant
License: MIT License
๐ญ Iโm a Cloud Consultant working @ Microsoft
I speak Spanish and English as well as:
Find me as @joselcaguilar
Currently I use this template to read in various entities and their states:
{%- for area in areas() %}
{%- set entities = area_entities(area) -%}
{%- set area_info = namespace(printed=false) %}
{%- if entities -%}
{%- for entity_id in entities -%}
{%- set entity_state = states.entity_id -%}
{%- if entity_state is not none %}
{%- if not area_info.printed %}
{{ area_name(area) }}:
{%- set area_info.printed = true %}
{%- endif %}
- {{ entity_id }}: {{ states(entity_id) }}
{%- endif %}
{%- endfor %}
{%- endif %}
{%- endfor %}
This only updates entity states when the Azure OpenAI integration is reloaded, is there any way for this information to be read by the Azure OpenAI integration in real-time?
Hi,
I would like to have HA read the ChatGPT responses through TTS using a media player. Is that possible somehow, e.g. to write the response to an attribute of an entity, where there isn't a 250 character limit.
I am currently on the latest Home Assistant version and cannot setup this integration. I have a working OpenAI instance on Azure.
Core: 2024.1.2
Supervisor: 2023.12.0
Operating System: 11.4
I get the following error:
2024-01-10 09:20:53.403 ERROR (MainThread) [custom_components.azure_openai_conversation.config_flow] Unexpected exception Traceback (most recent call last): File "/config/custom_components/azure_openai_conversation/config_flow.py", line 91, in async_step_user await validate_input(self.hass, user_input) File "/config/custom_components/azure_openai_conversation/config_flow.py", line 71, in validate_input await hass.async_add_executor_job(partial(openai.Model.list, request_timeout=10)) File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/openai/lib/_old_api.py", line 39, in __call__ openai.lib._old_api.APIRemovedInV1: You tried to access openai.Model, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python for the API. You can run
openai migrateto automatically upgrade your codebase to use the 1.0.0 interface. Alternatively, you can pin your installation to the old version, e.g.
pip install openai==0.28 A detailed migration guide is available here: https://github.com/openai/openai-python/discussions/742
I'm wondering if I've missed something with my setup. Trying the example in the LinkedIn article, I get this:
I only have a single model configured:
In HA I only have a single model configured as well:
However, it does look like it's at least getting some data from HA by the fact it was able to show the friendly name of the device:
Is there some way I need to configure this to use the Prompt Template? Is there something I need to do in HA or Azure to get it to return information?
I have updated to 2023.5.0, and appear to be having issues getting this integration to start. I had it installed (but not tested) with the prior version 2023.4.6, then removed and thought I would wait for 5.0. My system is setup in New Zealand.
Below is the log entry info:
This error originated from a custom integration.
Logger: homeassistant.config_entries
Source: custom_components/azure_openai_conversation/init.py:53
Integration: Azure OpenAI Conversation (documentation, issues)
First occurred: 09:57:32 (1 occurrences)
Last logged: 09:57:32
Error setting up entry Azure OpenAI Conversation for azure_openai_conversation
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/azure_openai_conversation/init.py", line 53, in async_setup_entry
conversation.async_set_agent(hass, entry, OpenAIAgent(hass, entry))
TypeError: Can't instantiate abstract class OpenAIAgent with abstract method supported_languages
Not exactly an issue with the addon, but this requirement is very vague:
Type your API Key, API Base and API Version used following the example below and hit submit:
API Key: 1234567890abcdef1234567890abcdef
API Base: https://iotlabopenai.openai.azure.com/
API Version: 2023-03-15-preview
After visiting the azure site, there seems to be so many choices on where exactly you need to go to get the key for this app. Can ya at least give a few steps or a guide somewhere to get this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.