-
Notifications
You must be signed in to change notification settings - Fork 238
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
Litellm patch #2254
Litellm patch #2254
Conversation
Fix missing outputs
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think streaming would not work with the current path. See comments
@@ -89,16 +89,20 @@ def log_stream_event( | |||
log.error("LiteLLM callback error: span not found.") | |||
return | |||
|
|||
result = kwargs.get("complete_streaming_response") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not look like you can remove this. It seems they get the result from there in the case of streaming, no?
@@ -194,16 +198,20 @@ async def async_log_stream_event( | |||
log.error("LiteLLM callback error: span not found.") | |||
return | |||
|
|||
result = kwargs.get("complete_streaming_response") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jp-agenta
Reviewed and QA'ed
As for streaming:
- I added a test for streaming
- Apparently the log_success gets called anyways with streaming, so no need to log each event (each chunk). I have just removed it.
- However, all the code in the case of streaming works, it returns strange warnings
Setting attribute on ended span.
Setting attribute on ended span.
Tried calling set_status on an ended span.
Calling end() on an ended span.
I don't understand the reason. Although the sucess_event is working and logging everything correctly, somehow the otel sdk is saying we are calling things on ended spans. Not a blocker anyways (happens only in streaming)
No description provided.