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

feat: Use finish_reason to check if response messages are tool_calls #165

Open
1 task done
npuichigo opened this issue Dec 24, 2024 · 1 comment
Open
1 task done

Comments

@npuichigo
Copy link

  • I have looked for existing issues (including closed) about this

Feature Request

feat: Use finish_reason to check if response messages are tool_calls

Motivation

tool_calls: Some(calls),

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

@0xMochan
Copy link
Contributor

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants