From a602bf189fa58adcf2899285ab34988c3e663c9e Mon Sep 17 00:00:00 2001 From: Teagan Glenn Date: Fri, 13 Sep 2024 01:45:29 -0600 Subject: [PATCH] Initialize the `tool_response` variable regardless of if a tool was called by the LLM --- custom_components/llama_conversation/conversation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/llama_conversation/conversation.py b/custom_components/llama_conversation/conversation.py index 6458287..a932533 100644 --- a/custom_components/llama_conversation/conversation.py +++ b/custom_components/llama_conversation/conversation.py @@ -421,6 +421,7 @@ async def async_process( response=intent_response, conversation_id=conversation_id ) + tool_response = None # parse response to_say = service_call_pattern.sub("", response.strip()) for block in service_call_pattern.findall(response.strip()):