-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add call_id to LLM events for correlating requests #4281
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
base: main
Are you sure you want to change the base?
Conversation
When monitoring LLM events, consumers need to know which events belong to the same API call. Before this change, there was no way to correlate LLMCallStartedEvent, LLMStreamChunkEvent, and LLMCallCompletedEvent belonging to the same request.
e69de9f to
d4b2828
Compare
|
Hey @vinibrsl, While streaming, there is no way to figure out which streaming chunks belongs to same chunk event, this PR add the response_id which is directly given by the provider. Though this only targets LLMStreamChunkEvent |
Thanks, @Vidit-Ostwal! That's great context. Unless I'm missing something here, Let me know if you think we should consolidate somehow or if keeping both makes sense. |
This makes more sense, The PR I add only targets the LLMStreamChunkEvent, which only if successful will be populated, but there are also other LLMStream events which needs to be coupled together, this PR adds that. Said that, this does makes the previous PR a bit redundant, as response_id has smaller scope, than call_id. which is trying to do the same functionality. |
We could follow up by marking response_id as deprecated, and eventually drop it in the next version. Thanks! |
It was merged today, 8 hrs back. |
When monitoring LLM events, consumers need to know which events belong to the same API call. Before this change, there was no way to correlate LLMCallStartedEvent, LLMStreamChunkEvent, and LLMCallCompletedEvent belonging to the same request.