Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-standard OpenAI-like response format on tool_calls. #160

Open
enricoros opened this issue Aug 1, 2024 · 1 comment
Open

Non-standard OpenAI-like response format on tool_calls. #160

enricoros opened this issue Aug 1, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@enricoros
Copy link

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.

@enricoros enricoros changed the title Non-standard OpenAI-like response format. Non-standard OpenAI-like response format on tool_calls. Aug 1, 2024
@orangetin
Copy link
Member

thanks! this should be fixed this week

@orangetin orangetin added the bug Something isn't working label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants