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

fix: Fix tool_calls compatibility issues with LobeChat #1009

Merged
merged 4 commits into from
May 30, 2024

Conversation

CH3CHO
Copy link
Collaborator

@CH3CHO CH3CHO commented May 28, 2024

Ⅰ. Describe what this PR did

  1. Add index field to toolCall.
  2. Always return id and name fields in functionCall even if they are empty.
  3. Make sure a response message doesn't contain non-empty content and tool_calls at the same time.
  4. Return token usages in the last stream chunk.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

1. Add index field to toolCall.
2. Always return id and name fields in functionCall even if they are empty.
3. Make sure a response message doesn't contain non-empty content and tool_calls at the same time.
4. Return token usages in the last stream chunk.
Copy link
Collaborator

@johnlanni johnlanni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@johnlanni johnlanni merged commit bdd050b into alibaba:main May 30, 2024
11 checks passed
@CH3CHO CH3CHO deleted the fix/tools-call-lobechat branch May 30, 2024 11:25
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

Successfully merging this pull request may close these issues.

None yet

2 participants