You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ideally instructor should retry/reask telling model to use correct tool names and arguments.
Its possible to use a hook to remove tool names that are not valid, eg the below, but this isnt ideal and can end up with no tool calls and empty content in completion if single invalid function called.
rog555
changed the title
KeyError in dsl/parallel.py tools when model calls invalid function
python KeyError in dsl/parallel.py tools when model calls invalid function
Nov 13, 2024
What Model are you using?
Describe the bug
Model sometimes sends completion with invalid tool causing
KeyError
in dsl/parallel.pyTo Reproduce
pip install respx
test_invalid_function.py
with following code:test_invalid_function.py
pytest test_invalid_function.py
Expected behavior
Ideally instructor should retry/reask telling model to use correct tool names and arguments.
Its possible to use a hook to remove tool names that are not valid, eg the below, but this isnt ideal and can end up with no tool calls and empty content in completion if single invalid function called.
Hook to remove invalid tools from completion
Screenshots
The text was updated successfully, but these errors were encountered: