-
Notifications
You must be signed in to change notification settings - Fork 1.4k
LiteLLM extension crashes with run_streamed #587
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
Comments
Yes, I noticed that in I corrected the code cheking if the attributes are present in the delta and then it worked, @rm-openai let me know if you have time to do it otherwise I may open a PR with the corrections and write a simple test for the streaming (if this solution may be good for you) |
@DanieleMorotti would love your PR |
thankyou all, waiting for this |
In response to issue #587 , I implemented a solution to first check if `refusal` and `usage` attributes exist in the `delta` object. I added a unit test similar to `test_openai_chatcompletions_stream.py`. Let me know if I should change something. --------- Co-authored-by: Rohan Mehta <[email protected]>
In response to issue openai#587 , I implemented a solution to first check if `refusal` and `usage` attributes exist in the `delta` object. I added a unit test similar to `test_openai_chatcompletions_stream.py`. Let me know if I should change something. --------- Co-authored-by: Rohan Mehta <[email protected]>
Describe the question
Running the LiteLLM sample from the doc works. However modifying the sample to use the run_streamed API to log responses, tool calls etc results in an exception.
Debug information
Repro steps
The sample given in the docs works:
Expected behavior
run_streamed should work or there should be some way of streaming events while using LiteLLM models.
The text was updated successfully, but these errors were encountered: