Hey there, I tried to get it running again on a new environment and did not have any issues with the initial setup. Containers are running and connection from HomeAssistant works without a problem.
However somehow the return values from my LLM are not valid for the Extended OpenAI Conversation integration as I get a function not found error back.
I do not totally understand why as the parsing in general looks correct but maybe someone has already seen this issue.
Logs
2024-11-17 18:41:06.882 INFO (MainThread) [custom_components.extended_openai_conversation] Prompt for gpt-3.5-turbo-1106: [{'role': 'system', 'content': "I want you to act as smart home manager of Home Assistant.\nI will provide information of smart home along with a question, you will truthfully make correction or answer using information provided in one sentence in everyday language.\n\nCurrent Time: 2024-11-17 18:41:06.874053+01:00\n\nAvailable Devices:\n```csv\nentity_id,name,state,aliases\nscript.move_spotify_playback,Spotify: Transfer and start spotify playback,off,\nscript.spotify_play_playlist,Spotify: Play searched playlist in area,off,\nbinary_sensor.pv_generating,PV generating,unavailable,PV Anlage\nsensor.daily_consumed_energy,Heute verbrauchte Energie,unavailable,\nsensor.daily_pv_generation,Heutige PV Produktion,unavailable,\nsensor.daily_exported_energy_from_pv,Heute exportierte Energie,unavailable,\nsensor.daily_imported_energy,Heute importierte Energie,unavailable,\nswitch.pi_hole,Pi-Hole,on,\nlight.schrankwand,Schrankwand,on,\nlight.bildschirm_links,Bildschirm links,on,\nlight.bildschirm_unten,Bildschirm unten,on,\nlight.schreibtisch,Schreibtisch,on,\nlight.bildschirm_rechts,Bildschirm rechts,on,\nlight.bett,Bett,on,\nlight.lightstrip,Lightstrip,on,\nlight.deckenlampe,Deckenlampe,on,\nscene.deckenlampe_konzentrieren,Deckenlampe Konzentrieren,2024-08-11T15:21:57.143597+00:00,\nscene.deckenlampe_nachtlicht,Deckenlampe Nachtlicht,2024-11-17T00:12:00.714975+00:00,\nscene.tims_zimmer_nachtlicht,Tims Zimmer Nachtlicht,2024-11-05T22:30:21.388839+00:00,\nscene.deckenlampe_lesen,Deckenlampe Lesen,2024-11-17T15:25:43.220624+00:00,\nscene.tims_zimmer_konzentrieren,Tims Zimmer Konzentrieren,2024-10-27T11:45:54.830200+00:00,\nscene.tims_zimmer_lesen,Tims Zimmer Lesen,2024-11-17T12:20:25.118701+00:00,\nscene.bildschirm_nachtlicht,Bildschirm Nachtlicht,2024-09-13T20:14:47.997107+00:00,\nscene.deckenlampe_sonnenuntergang_savanne,Deckenlampe Sonnenuntergang Savanne,unknown,\nscene.bildschirm_lesen,Bildschirm Lesen,2024-10-17T19:34:31.094546+00:00,\nscene.deckenlampe_nordlichter,Deckenlampe Nordlichter,unknown,\nscene.bildschirm_konzentrieren,Bildschirm Konzentrieren,2024-07-17T15:45:31.630469+00:00,\nweather.forecast_rheda_wiedenbruck,Zuhause,cloudy,Rheda-Wiedenbrück\nlight.bildschirm,Bildschirm,on,\nbinary_sensor.window_tim_contact,Fenster Tim,off,Fenster Tim/Tims Fenster\nlight.fussleiste,Fußleiste,off,Fussleiste/Fußleister/Fuß leiste\nmedia_player.spotify_tim,Spotify tim,idle,\nclimate.heizung_tim,Heizung Tim,heat,\nmedia_player.this_device_2,This Device,standby,\nmedia_player.spotifyplus_tim,SpotifyPlus tim,paused,\nsensor.humidity_tim,Humidity Tim,56.20000076,\nsensor.co2_tim,CO2 Tim,1081,\nsensor.temperature_tim,Temperature Tim,21.5,Schlafzimmer Tim/Temperatur Tim\nmedia_player.sm_t970_snapcast_client_2,SM-T970 Snapcast Client,unavailable,\nmedia_player.sm_t970_snapcast_group_5,SM-T970 Snapcast Group,unavailable,\nmedia_player.snapweb_client_snapcast_group_2,Snapweb client Snapcast Group,unavailable,\nmedia_player.sm_t970_snapcast_group_6,SM-T970 Snapcast Group,unavailable,\nmedia_player.sm_t970_snapcast_group_7,SM-T970 Snapcast Group,unavailable,\nmedia_player.tim_linux_snapcast_group_2,tim-linux Snapcast Group,unavailable,\nmedia_player.tim_linux_snapcast_group_3,tim-linux Snapcast Group,idle,\nmedia_player.tim_linux,tim-linux,idle,\n```\n\nThe current state of devices is provided in available devices.\nUse execute_services function only for requested action, not for current states.\nDo not execute service without user's confirmation.\nDo not restate or appreciate what user says, rather make a quick inquiry."}, {'role': 'user', 'content': 'Turn off Deckenlampe'}]
2024-11-17 18:41:16.023 INFO (MainThread) [custom_components.extended_openai_conversation] Response {'id': 'chatcmpl-d471fb1a-20d5-4cbe-bbe8-f68a91cd6c21', 'choices': [{'finish_reason': 'tool_calls', 'index': 0, 'message': {'role': 'assistant', 'function_call': {'arguments': '{"domain": "light", "service": "turn_off"}', 'name': 'assistant\n<|recipient|> all'}, 'tool_calls': [{'id': 'call_sLGEPMjwbWVI31qE7QAMRl09', 'function': {'arguments': '{"domain": "light", "service": "turn_off"}', 'name': 'assistant\n<|recipient|> all'}, 'type': 'function'}]}}], 'created': 1731865275, 'model': 'gpt-3.5-turbo-1106', 'object': 'chat.completion', 'usage': {'completion_tokens': 1, 'prompt_tokens': 1737, 'total_tokens': 1738}}
2024-11-17 18:41:16.030 ERROR (MainThread) [custom_components.extended_openai_conversation] function 'assistant
<|recipient|> all' does not exist
Traceback (most recent call last):
File "/config/custom_components/extended_openai_conversation/__init__.py", line 196, in async_process
query_response = await self.query(user_input, messages, exposed_entities, 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/extended_openai_conversation/__init__.py", line 383, in query
return await self.execute_tool_calls(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/extended_openai_conversation/__init__.py", line 468, in execute_tool_calls
raise FunctionNotFound(function_name)
custom_components.extended_openai_conversation.exceptions.FunctionNotFound: function 'assistant
<|recipient|> all' does not exist