-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add tool call start and completed streaming events #737
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?
Changes from all commits
97b84cf
e80efbb
16fd9a7
e8b85d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -255,12 +255,16 @@ message StreamThreadEventsResponse { | |
| ContentDeltaEvent content_delta = 2; | ||
| // A content block has completed | ||
| ContentStopEvent content_stop = 3; | ||
| // A tool call made by the LLM (input may be null if >512KB) | ||
| tim.api.tool.v1alpha1.ToolCall tool_call = 4; | ||
| // A tool call is about to be executed (tool name known, input may be incomplete) | ||
| ToolCallStartEvent tool_call_start = 4; | ||
| // A tool call made by the LLM with full input (input may be null if >512KB) | ||
| tim.api.tool.v1alpha1.ToolCall tool_call = 5; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this full Maybe we should have some sort of user side event that would only include full parameters on things we expect user side? With the above note we could have a lifecycle:
Maybe is worth a follow up ticket? Curious your thoughts here
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this generally make sense. There is a tool call api endpoint that a client can hit to get the full tool call. Right now we don't even pass the full params if they are over a certain size to prevent the events from being too "fat". I am wondering if it also might make sense to just say that, if you are streaming events and see that you need to run a tool, you need to request the tool parameters from the API. Basically what you outlined, except
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| // A tool call has completed execution with results | ||
| ToolCallCompleteEvent tool_call_complete = 6; | ||
| // The thread's LLM processing state has changed (IDLE or PROCESSING) | ||
| ThreadStateChangeEvent thread_state_change = 5; | ||
| ThreadStateChangeEvent thread_state_change = 7; | ||
| // The LLM stream encountered an error | ||
| StreamErrorEvent stream_error = 6; | ||
| StreamErrorEvent stream_error = 8; | ||
| } | ||
| } | ||
|
|
||
|
|
||
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.
Perhaps call this
ToolCallCreatedsince this is not that execution is started or that the call has even be made. Could be a hair confusing.