UNPKG

assistant-stream

Version:

Streaming utilities for AI assistants

20 lines • 1.05 kB
import type { ReadonlyJSONObject, ReadonlyJSONValue } from "../../utils/json/json-value.js"; import type { ToolCallReader } from "./tool-types.js"; import type { ToolResponse } from "./ToolResponse.js"; export type InternalToolExecutionOptions = { execute: (toolCall: { toolCallId: string; toolName: string; args: ReadonlyJSONObject; executionId: symbol; }) => Promise<ToolResponse<ReadonlyJSONValue>> | ToolResponse<ReadonlyJSONValue> | undefined; streamCall: <TArgs extends ReadonlyJSONObject = ReadonlyJSONObject, TResult extends ReadonlyJSONValue = ReadonlyJSONValue>(toolCall: { reader: ToolCallReader<TArgs, TResult>; toolCallId: string; toolName: string; executionId: symbol; }) => unknown; onExecutionStart?: ((toolCallId: string, toolName: string, executionId: symbol) => void) | undefined; onExecutionEnd?: ((toolCallId: string, toolName: string, executionId: symbol) => void) | undefined; }; //# sourceMappingURL=internal-tool-execution-options.d.ts.map