jekalmin / extended_openai_conversation

Home Assistant custom component of conversation agent. It uses OpenAI to control your devices.
958 stars 135 forks source link

Memory doesn't seem to work #241

Open ChristianEvc opened 4 months ago

ChristianEvc commented 4 months ago

Hi,

I've been running extended open ai for a few months now, and it works exceptionally well, especially after migrating to GPT-4o.

However, I'm having some issues with memory. It doesn't seem to be able to recall the previous conversations, even if I immediately ask a followup question. Nothing seems to be going wrong per se, but I can't get this to work. I've tried a number of different token settings (from 1000 to 20000), but it still doesn't seem to work.

Any ideas from anyone?

holzmichlnator commented 4 months ago

What kind of voice satellite do you use? As far as i understood the code in this repo, a wyoming conversation id is required by the agent to be able to send the previous chat messages along with the new request to OpenAI. The conversation id is part of the wyoming protocol / assist pipeline, but it depends on the voice satellite itself if he creates a new conversation for every request (by sending null) or if he continues with an existing conversation.

For ESPHome satellites this is already implemented and i can definitely say that it works with my M5 Stack Atom lite. The ESPHome satellite implementation creates a new conversation after 5 minutes. Within these 5 minutes the satellite continues an existing conversation. On the other hand, i also have a wyoming-satellite setup running on a raspberry pi 2w, which does not continue existing conversation and instead creates a new one every request. But support for conversations was added a few days ago in that repo (https://github.com/home-assistant/core/pull/118835), so it should be part of the next release of wyoming-satellite.

ChristianEvc commented 4 months ago

@holzmichlnator Thanks for this! I'm running my wyoming sattelite on a raspberry pi 2 zero w, so that sounds like it could def be it! Great news on the fix. Thanks for the heads up!

guinmoon commented 3 months ago

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.