throw error if the llm tries to call a function that's not registered

This commit is contained in:
Kwindla Hultman Kramer
2024-09-29 21:10:21 -07:00
parent a5c73ec829
commit 6ad3437fd2

View File

@@ -288,6 +288,10 @@ class BaseOpenAILLMService(LLMService):
tool_call_id=tool_id,
run_llm=run_llm,
)
else:
raise OpenAIUnhandledFunctionException(
f"The LLM tried to call a function named '{function_name}', but there isn't a callback registered for that function."
)
async def _update_settings(self, frame: LLMUpdateSettingsFrame):
if frame.model is not None: