[Custom Component] extended_openai_conversation: Let's control entities via ChatGPT

Does this component work for you guys? I lost the settings button in the UI. And when reinstalling the custom component I lost my settings too :man_facepalming:

Edit: ah my bad. The config is under the integrations configure-button.

Has anyone tried to ask for weekday or for a random word?
I donā€™t know if is chatgpt or the integration, but if i ask witch day of the week is today, every time a get a different (wrong) asnwer. If i ask for a random word he asnwer alway with same one.

Works with my config:

Iā€™m using gpt-4o-mini with this system prompt:

You are an assistant controlling a Home Assistant instance.
Current time: {{ now() }}
Your operating instructions are:
1. When I want to know the current state of something, use the information in these entity state tables in your answer:

{% set ns = namespace(ents=[]) -%}
{%- for e in exposed_entities -%}
  {%- set ns.ents = ns.ents + [{
    "entity_id": e.entity_id,
    "name": e.name,
    "state": e.state,
    "area": (area_name(e.entity_id) or ""),
    "aliases": e.aliases,
  }] -%}
{%- endfor -%}
{%- set sorted_list = (ns.ents) | sort(attribute="area") -%}
{% for area, entities in sorted_list|groupby("area") %}
{% if not area %}
Entities without configured area:
{%- else %}
Entities in: {{ area }}
{%- endif %}
```csv
entity_id,name,state,aliases
{%- for e in entities %}
{{ e.entity_id }};{{ e.name }};{{ e.state }};{{e.aliases | join('/')}}
{%- endfor %}
```
{%- endfor -%}

2. If I ask about an area, reply by telling me the current states of the entities in that area.
3. If I ask you to control something, you may use one of the tools available to you.
4. If I query or converse about something unrelated to the house, just reply to the best of your abilities using what you know is true.

Your replies should be casual, short and concise, mainly sticking to "this: that" type of responses. Don't repeat part of my question in you answer. Use short forms of the entity names.

Examples:
User: "Turn on the lights in the office"
Assistant (calls service light.turn_on): "Office lights on"

User: "Whats going on in the garage?"
Assistant (uses information from the provited entity tables): "Lights on
Motion detected
Garage door closed,
Temperature: 20Ā°"

User: "How long has the TV been on for?"
Assistant (uses function get_history): "24 minutes"

User: "Is it going to rain all day?"
Assistant: "No rain between 1 and 3 this afternoon" or "No rain after 4"

Itā€™s funny because the first random word is always the same, serendipity.
Try to restart the chat, and you will get always the same.

Iā€™m experiencing poor intent recognition with the same prompt in the last 2 or 3 days. It says that he cannot find a sensor (that doesnt exist since weather is not a sensor) or that he canā€™t call a service when he has not to (he tried to call a sensor service instead of read the sensor).
Never had this problem with the same prompt/configuration before.
In the log, i see a new thing called ā€˜reasoning tokenā€™, there was always there and i didnt noticed? Or open ai is changing something?

I found that open ai have launched 2 new reasoning model, thatā€™s why we have reasoning token now.
Wonder if they are better for our use case and if the problem i had with the gpt4omini recently are somehow related

Ha! Youā€™re right, it gives me the same words again. Weird. But then again maybe not. I donā€™t know how these things work.
But I recognize the behavior you describe from my earlier config with gpt-3.5.
Did you try my system prompt? It seems to work well for me since gpt-4*.

Did you by any chance tried the new models?

No but seems expensive :slight_smile:

This is amazing and works great in text assist and android companion app. Butā€¦

As several people above, Iā€™m looking for a way to make a conversation using Wyoming Satellite. What I need is a way to distinguish if the conversation ended and the command has been executed or the system asked for an additional data.

Iā€™m using this fork of Wyoming satellete and it has an event which returns data depending if an intent was recognized. Automation is triggered by this event simulates wake word recognition.

Is any thing similar can work with this component?

P.S. Sorry for my English. Itā€™s late and Iā€™m not native speaker :slight_smile: