Skip to content

AIDK API Reference / aidk/testing / createToolCallEventSequence

Function: createToolCallEventSequence() ​

ts
function createToolCallEventSequence(
   toolName: string, 
   toolInput: Record<string, unknown>, 
   tick: number): StreamEvent[];

Defined in: packages/shared/src/testing/fixtures.ts:1186

Create a sequence of StreamEvents for a tool call.

Follows the pattern: message_start → tool_call_start → tool_call_delta* → tool_call_end → tool_call → message_end → message

Parameters ​

ParameterTypeDefault value
toolNamestringundefined
toolInputRecord<string, unknown>undefined
ticknumber1

Returns ​

StreamEvent[]

Released under the MIT License.