diff --git a/custom_components/extended_openai_conversation/__init__.py b/custom_components/extended_openai_conversation/__init__.py index f3acefe..68c4d39 100644 --- a/custom_components/extended_openai_conversation/__init__.py +++ b/custom_components/extended_openai_conversation/__init__.py @@ -284,6 +284,9 @@ async def query( DEFAULT_MAX_FUNCTION_CALLS_PER_CONVERSATION, ): function_call = "none" + if len(functions) == 0: + functions = None + function_call = None model_key = self.entry.options.get( CONF_MODEL_KEY, get_default_model_key(api_base)