Optional
config: ClientConfigProtected
apiProtected
asyncProtected
defaultProtected
Optional
onProtected
timeoutThe ID of the thread.
The ID of the run.
Whether to block when canceling
Action to take when cancelling the run. Possible values are interrupt
or rollback
. Default is interrupt
.
Create a run.
The ID of the thread.
Assistant ID to use for this run.
Optional
payload: RunsCreatePayloadPayload for creating a run.
The created run.
Create a batch of stateless background runs.
An array of payloads for creating runs.
An array of created runs.
Delete a run.
The ID of the thread.
The ID of the run.
Protected
fetchOptional
options: RequestInit & {Get a run by ID.
The ID of the thread.
The ID of the run.
The run.
Block until a run is done.
The ID of the thread.
The ID of the run.
Optional
options: { signal?: AbortSignal }Stream output from a run in real-time, until the run is done.
The ID of the thread. Can be set to null
| undefined
for stateless runs.
The ID of the run.
Optional
options: Additional options for controlling the stream behavior:
An async generator yielding stream parts.
List all runs for a thread.
The ID of the thread.
Optional
options: {Filtering and pagination options.
Optional
limit?: numberMaximum number of runs to return. Defaults to 10
Optional
offset?: numberOffset to start from. Defaults to 0.
Optional
select?: RunSelectField[]Optional
status?: RunStatusStatus of the run to filter by.
List of runs.
Protected
prepareOptional
options: RequestInit & {Optional
payload: Omit<Optional
payload: RunsStreamPayload<TStreamMode, TSubgraphs>Optional
payload: Omit<RunsWaitPayload, "multitaskStrategy" | "onCompletion">Optional
payload: RunsWaitPayload
Cancel a run.