test(test_function_call_parsing.py): handle anthropic internal server error

This commit is contained in:
Krrish Dholakia 2024-09-05 09:27:42 -07:00
parent e338cf2300
commit cd56f9fa3e

View file

@ -134,11 +134,11 @@ def trade(model_name: str) -> List[Trade]:
"function": {"name": tool_spec["function"]["name"]}, # type: ignore
},
)
calls = response.choices[0].message.tool_calls
trades = [trade for call in calls for trade in parse_call(call)]
return trades
except litellm.InternalServerError:
pass
calls = response.choices[0].message.tool_calls
trades = [trade for call in calls for trade in parse_call(call)]
return trades
@pytest.mark.parametrize(