extended_openai_conversation icon indicating copy to clipboard operation
extended_openai_conversation copied to clipboard

No context when used with Wyoming satellite

Open Edmundas1 opened this issue 1 year ago • 5 comments

When I'm using HA assist pipeline with extended_openai_conversation through Wyoming satellite devices there is no context passed to openai API, I've looked into logs and each request is like completely new request. When I'm using assist chat through HA web interface with the same pipeline, everything works fine.

Edmundas1 avatar Jan 29 '24 18:01 Edmundas1

Yes, i'm aware of this also. @jekalmin any thought about this?

LowKey88 avatar Jan 30 '24 05:01 LowKey88

Thanks for reporting an issue!

In order to use same message history, conversation_id should be passed to ConversationAgent. It seems Wyoming satellite devices don't pass conversation_id after first conversation.

In my opinion, it's Wyoming satellite devices' responsibility to pass conversation_id because HA web and Esphome devices (m5stack atom echo and esp32-s3-box) have implemented this.

To dig deeper, please add following code in this line and see if conversation_id is None.

print("user_input", user_input, "context", user_input.context.as_dict())

Ideally, conversation_id should be None on the first time, and not None starting from second request.

jekalmin avatar Jan 30 '24 12:01 jekalmin

OK, it's confirmed, the conversation_id is not passed and conversation_id = None all the time of request using Wyoming Satellite

- `user_input: ConversationInput(text='xxx', context=<...>, conversation_id=None, device_id='...', language='*'), context: {'id': '...', 'parent_id': None, 'user_id': None}`
- `user_input: ConversationInput(text='xxx.', context=<...>, conversation_id=None, device_id='...', language='*'), context: {'id': '...', 'parent_id': None, 'user_id': None}`

LowKey88 avatar Jan 30 '24 13:01 LowKey88

Thank you jekalmin and LowKey88, hopefully it'll be fixed at wyoming-satellite or maybe I will switch to ESPHome, though local wake word detection is a plus for Wyoming satellite.

Edmundas1 avatar Jan 30 '24 14:01 Edmundas1

Hi I found a solution that works for me. Now when I use wyoming satellite from docker extended_openai_conversation remembers what we talked about before.

guinmoon avatar Jul 27 '24 11:07 guinmoon