Skip to content

Commit

Permalink
fix: edge case of callable entry not being retrieved
Browse files Browse the repository at this point in the history
  • Loading branch information
mmikita95 committed Dec 4, 2024
1 parent 2792d91 commit 9930c13
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/writer/ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -1546,6 +1546,11 @@ def _convert_argument_to_type(self, value: Any, target_type: str) -> Any:

def _check_if_arguments_are_required(self, function_name: str) -> bool:
callable_entry = self._callable_registry.get(function_name)
if not callable_entry:
raise RuntimeError(
f"Tried to check arguments of function {function_name} " +
"which is not present in the conversation's callable registry."
)
callable_parameters = callable_entry.get("parameters")
return \
callable_parameters is not None \
Expand Down

0 comments on commit 9930c13

Please sign in to comment.