Skip to content

FunctionCallResultItem

type FunctionCallResultItem = object;
callId: string;

The ID of the tool call. Required to match up the respective tool call result.

optional id: string;

An ID to identify the item. This is optional by default. If a model provider absolutely requires this field, it will be validated on the model level.

name: string;

The name of the tool that was called

output:
| {
providerData?: Record<string, any>;
text: string;
type: "text";
}
| {
data: string;
mediaType: string;
providerData?: Record<string, any>;
type: "image";
};

The output of the tool call.

{
providerData?: Record<string, any>;
text: string;
type: "text";
}
{
data: string;
mediaType: string;
providerData?: Record<string, any>;
type: "image";
}
optional providerData: Record<string, any>;

Additional optional provider specific data. Used for custom functionality or model provider specific fields.

status: "in_progress" | "completed" | "incomplete";

The status of the tool call.

type: "function_call_result";