Merge pull request #3305 from omChauhanDev/fix_unregister_function

fix: missing key access by adding existence check
This commit is contained in:
Aleix Conchillo Flaqué
2025-12-29 14:52:41 -08:00
committed by GitHub

View File

@@ -408,7 +408,7 @@ class LLMService(AIService):
function_name: The name of the function handler to remove.
"""
del self._functions[function_name]
if self._start_callbacks[function_name]:
if function_name in self._start_callbacks:
del self._start_callbacks[function_name]
def unregister_direct_function(self, handler: Any):