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 parsing multi tool calls in stream_chunk_builder #4936

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

omerc7
Copy link

@omerc7 omerc7 commented Jul 29, 2024

Title

Fix - parsing multi tool calls in stream_chunk_builder

Type

🐛 Bug Fix

Changes

Add index to last function call in stream_chunk_builder
Fix function name in multi tool calls

[REQUIRED] Testing

Did not find any tests with actual data parsing retuned from llm (or mock) in litellm/tests/test_stream_chunk_builder.py

In the print screens below the llm want to call

  1. function name: aws-s3-list with no args
  2. function name: aws-list-secrets with args: {"max_items": "3"}

Before:
Screenshot 2024-07-29 at 16 13 55

After:
Screenshot 2024-07-29 at 16 10 30

Copy link

vercel bot commented Jul 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2024 1:24pm

Copy link

@tal-mogendorff tal-mogendorff left a comment

Choose a reason for hiding this comment

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

Great PR, looks like you are working in an AI company

@krrishdholakia
Copy link
Contributor

hey @omerc7 thank you for this pr. can you add a test for this in test_stream_chunk_builder.py + share a screenshot of it passing?

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.

3 participants