litellm icon indicating copy to clipboard operation
litellm copied to clipboard

fix parsing multi tool calls in stream_chunk_builder

Open omerc7 opened this issue 1 year ago • 2 comments

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

omerc7 avatar Jul 29 '24 13:07 omerc7

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

vercel[bot] avatar Jul 29 '24 13:07 vercel[bot]

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?

krrishdholakia avatar Jul 30 '24 21:07 krrishdholakia

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Apr 22 '25 22:04 CLAassistant

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Jul 22 '25 00:07 github-actions[bot]