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
Currently we check if tool_calls is None, and actually some openai compatible servers like vllm just return empty list of tool_calls and the openai document does not express tool_calls as optional, so it's not save to just check it with None.
Proposal
Check the finish_reason field on tool_calls or add additional check for empty list
Alternatives
Maybe other ways exist to handle this
The text was updated successfully, but these errors were encountered:
This is a good catch. A lot of our implementation for the openai spec actually has changed overtime due to a natural upgrade in LLM specs (all backwards compatible).
Feature Request
feat: Use finish_reason to check if response messages are tool_calls
Motivation
rig/rig-core/src/providers/openai.rs
Line 381 in 8e6f197
Currently we check if
tool_calls
is None, and actually some openai compatible servers likevllm
just return empty list oftool_calls
and the openai document does not expresstool_calls
as optional, so it's not save to just check it withNone
.Proposal
Check the finish_reason field on
tool_calls
or add additional check for empty listAlternatives
Maybe other ways exist to handle this
The text was updated successfully, but these errors were encountered: