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
Hello, opening the bug here despite it being not the best place.
Wanted to let you know about some non-standard answers in the Together API which force special cases in OpenAI-like protocol parsers.
The root is returning null in place of a missing (or undefined) field. Not a big deal, it just forces special cases, as OpenAI-compliant parsers do not treat null and undefined (aka missing) fields equally.
This happens in 3 instances (that I know of):
choices[number].delta.tool_calls = null; // for text-only responses
choices[number].delta.tool_calls[number].function.arguments = null; // seems to be during the first call when the name is given
choices[number].delta.tool_calls[number].function.name = null; // seems to be during the continuation of json tool call arguments
This is nothing major, but imagine that other downstream parsers will break and have to add special cases for Together. Sometimes it can hinder adoption, so I thought you'd appreciate if I'd let you know.
The text was updated successfully, but these errors were encountered:
enricoros
added a commit
to enricoros/big-AGI
that referenced
this issue
Aug 1, 2024
Hello, opening the bug here despite it being not the best place.
Wanted to let you know about some non-standard answers in the Together API which force special cases in OpenAI-like protocol parsers.
The root is returning
null
in place of a missing (or undefined) field. Not a big deal, it just forces special cases, as OpenAI-compliant parsers do not treat null and undefined (aka missing) fields equally.This happens in 3 instances (that I know of):
choices[number].delta.tool_calls = null;
// for text-only responseschoices[number].delta.tool_calls[number].function.arguments = null;
// seems to be during the first call when the name is givenchoices[number].delta.tool_calls[number].function.name = null;
// seems to be during the continuation of json tool call argumentsThis is nothing major, but imagine that other downstream parsers will break and have to add special cases for Together. Sometimes it can hinder adoption, so I thought you'd appreciate if I'd let you know.
The text was updated successfully, but these errors were encountered: