Conversation
A function call can carry parent_tool_call_id, the tool_call_id of the
call it ran as part of (e.g. calls a backend makes on behalf of a
delegate tool while that call is in progress). The Conversation view
groups such calls with nestFunctionCalls: a call whose parent is in the
conversation is rendered indented under the parent's row, with its own
status icon, name and collapsible details, recursively for deeper
nesting, and the parent shows how many calls ran under it
("(delegate) · 2 nested calls"). A call whose parent is not in the
conversation stays at the top level, exactly like a call without a
parent. Arrival order is kept at every level.
parent_tool_call_id is read through NestableFunctionCallData, an
intersection with FunctionCallData, until the @pipecat-ai/client-react
release that declares the field is published.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What a nested function call is
Pipecat's RTVI function-call events are gaining an optional
parent_tool_call_id: thetool_call_idof the function call this one ran as part of. A tool's work can involve function calls of its own, made by another model on its behalf, e.g. a backend that adelegatetool hands work to makes calls while thedelegatecall is in progress; each of them names it as its parent. The field is absent for a call the bot's LLM made itself.Rendering rule
Conversation(and so the Console template) groups function-call messages with a newnestFunctionCallshelper before rendering:parent_tool_call_idmatches a call rendered in the same conversation is shown indented under that parent, directly below the parent's row, using the sameFunctionCallContentrow (own status icon, name, collapsible arguments/result). Nesting recurses for deeper levels.(delegate) · 2 nested calls(singular for one).functionCallLabelstill applies to every row.FunctionCallContentgains anestedCallsprop andMessageContaineranestedFunctionCallsprop;nestFunctionCalls,NestedFunctionCall, andNestableFunctionCallDataare exported from the package. The docs page forFunctionCallContentdescribes nested calls, and a vitest covers the grouping helper.Dependencies
parent_tool_call_idis read throughNestableFunctionCallData(FunctionCallData & { parent_tool_call_id?: string }) so this type-checks against the currently published@pipecat-ai/client-react. It depends on:parent_tool_call_idreachingFunctionCallDatain@pipecat-ai/client-reactvia pipecat-ai/pipecat-client-web (companion PR).Until both ship, every call renders at the top level as before. The client-react dependency version is unchanged.