Giter Club home page Giter Club logo

azure-openai-ha's Introduction

Hi there ๐Ÿ‘‹๐ŸŽ‰

๐Ÿ”ญ Iโ€™m a Cloud Consultant working @ Microsoft

I speak Spanish and English as well as:

Azure Azure DevOps Git GitHub Actions Docker Kubernetes REST API C# PowerShell Python Bash Go Terraform Visual Studio Visual Studio Code


Find me as @joselcaguilar

ย  ย  ย  ย 


azure-openai-ha's People

Contributors

dependabot[bot] avatar jobvk avatar joselcaguilar avatar viper5000 avatar weiting-tw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

azure-openai-ha's Issues

Is there a way for this integration to see device and entity changes in real-time?

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?

Cannot setup integration on 2024.1.2

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

Not able to get a useful response

I'm wondering if I've missed something with my setup. Trying the example in the LinkedIn article, I get this:
image

I only have a single model configured:
image

In HA I only have a single model configured as well:
image

If I ask about a device:
image

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:
image

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?

Can't instantiate abstract class OpenAIAgent with abstract method supported_languages

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

Where to get the API key?

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.