RunMessageOutputItem
Extends
Section titled “Extends”RunItemBase
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new RunMessageOutputItem(rawItem, agent): RunMessageOutputItem;
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
|
{ |
‐ |
|
( | { |
The content of the message. |
|
|
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. |
|
|
Additional optional provider specific data. Used for custom functionality or model provider specific fields. |
|
|
Representing a message from the assistant (i.e. the model) |
|
|
The status of the message. |
|
|
Any item without a type is treated as a message |
|
‐ |
Returns
Section titled “Returns”RunMessageOutputItem
Overrides
Section titled “Overrides”RunItemBase.constructor
Properties
Section titled “Properties”agent: Agent;
rawItem
Section titled “rawItem”rawItem: object;
Name | Type | Description |
---|---|---|
|
(
| {
|
The content of the message. |
|
|
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. |
|
|
Additional optional provider specific data. Used for custom functionality or model provider specific fields. |
|
|
Representing a message from the assistant (i.e. the model) |
|
|
The status of the message. |
|
|
Any item without a type is treated as a message |
Inherited from
Section titled “Inherited from”RunItemBase.rawItem
readonly type: "message_output_item";
Overrides
Section titled “Overrides”RunItemBase.type
Accessors
Section titled “Accessors”content
Section titled “content”Get Signature
Section titled “Get Signature”get content(): string;
Returns
Section titled “Returns”string
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): object;
Returns
Section titled “Returns”object
agent: object;
agent.name
Section titled “agent.name”name: string;
rawItem
Section titled “rawItem”rawItem: | undefined | { content: ( | { providerData?: Record<string, any>; refusal: string; type: "refusal"; } | { providerData?: Record<string, any>; text: string; type: "output_text"; } | { providerData?: Record<string, any>; text: string; type: "input_text"; } | { audio: | string | { id: string; }; format?: null | string; providerData?: Record<string, any>; transcript?: null | string; type: "audio"; } | { image: string; providerData?: Record<string, any>; type: "image"; })[]; id?: string; providerData?: Record<string, any>; role: "assistant"; status: "in_progress" | "completed" | "incomplete"; type?: "message";} | { content: | string | ( | { providerData?: Record<string, any>; text: string; type: "input_text"; } | { image: | string | { id: string; }; providerData?: Record<string, any>; type: "input_image"; } | { file: | string | { id: string; }; providerData?: Record<string, any>; type: "input_file"; } | { audio: | string | { id: string; }; format?: null | string; providerData?: Record<string, any>; transcript?: null | string; type: "audio"; })[]; id?: string; providerData?: Record<string, any>; role: "user"; type?: "message";} | { content: string; id?: string; providerData?: Record<string, any>; role: "system"; type?: "message";} | { arguments?: string; id?: string; name: string; output?: string; providerData?: Record<string, any>; status?: string; type: "hosted_tool_call";} | { arguments: string; callId: string; id?: string; name: string; providerData?: Record<string, any>; status?: "in_progress" | "completed" | "incomplete"; type: "function_call";} | { callId: string; id?: string; name: string; output: | { providerData?: Record<string, any>; text: string; type: "text"; } | { data: string; mediaType: string; providerData?: Record<string, any>; type: "image"; }; providerData?: Record<string, any>; status: "in_progress" | "completed" | "incomplete"; type: "function_call_result";} | { action: | { type: "screenshot"; } | { button: "left" | "right" | "wheel" | "back" | "forward"; type: "click"; x: number; y: number; } | { type: "double_click"; x: number; y: number; } | { scroll_x: number; scroll_y: number; type: "scroll"; x: number; y: number; } | { text: string; type: "type"; } | { type: "wait"; } | { type: "move"; x: number; y: number; } | { keys: string[]; type: "keypress"; } | { path: object[]; type: "drag"; }; callId: string; id?: string; providerData?: Record<string, any>; status: "in_progress" | "completed" | "incomplete"; type: "computer_call";} | { callId: string; id?: string; output: { data: string; providerData?: Record<string, any>; type: "computer_screenshot"; }; providerData?: Record<string, any>; type: "computer_call_result";} | { content: object[]; id?: string; providerData?: Record<string, any>; type: "reasoning";} | { id?: string; providerData?: Record<string, any>; type: "unknown";};
Type declaration
Section titled “Type declaration”undefined
{ content: ( | { providerData?: Record<string, any>; refusal: string; type: "refusal"; } | { providerData?: Record<string, any>; text: string; type: "output_text"; } | { providerData?: Record<string, any>; text: string; type: "input_text"; } | { audio: | string | { id: string; }; format?: null | string; providerData?: Record<string, any>; transcript?: null | string; type: "audio"; } | { image: string; providerData?: Record<string, any>; type: "image"; })[]; id?: string; providerData?: Record<string, any>; role: "assistant"; status: "in_progress" | "completed" | "incomplete"; type?: "message";}
{ content: | string | ( | { providerData?: Record<string, any>; text: string; type: "input_text"; } | { image: | string | { id: string; }; providerData?: Record<string, any>; type: "input_image"; } | { file: | string | { id: string; }; providerData?: Record<string, any>; type: "input_file"; } | { audio: | string | { id: string; }; format?: null | string; providerData?: Record<string, any>; transcript?: null | string; type: "audio"; })[]; id?: string; providerData?: Record<string, any>; role: "user"; type?: "message";}
{ content: string; id?: string; providerData?: Record<string, any>; role: "system"; type?: "message";}
{ arguments?: string; id?: string; name: string; output?: string; providerData?: Record<string, any>; status?: string; type: "hosted_tool_call";}
{ arguments: string; callId: string; id?: string; name: string; providerData?: Record<string, any>; status?: "in_progress" | "completed" | "incomplete"; type: "function_call";}
{ callId: string; id?: string; name: string; output: | { providerData?: Record<string, any>; text: string; type: "text"; } | { data: string; mediaType: string; providerData?: Record<string, any>; type: "image"; }; providerData?: Record<string, any>; status: "in_progress" | "completed" | "incomplete"; type: "function_call_result";}
{ action: | { type: "screenshot"; } | { button: "left" | "right" | "wheel" | "back" | "forward"; type: "click"; x: number; y: number; } | { type: "double_click"; x: number; y: number; } | { scroll_x: number; scroll_y: number; type: "scroll"; x: number; y: number; } | { text: string; type: "type"; } | { type: "wait"; } | { type: "move"; x: number; y: number; } | { keys: string[]; type: "keypress"; } | { path: object[]; type: "drag"; }; callId: string; id?: string; providerData?: Record<string, any>; status: "in_progress" | "completed" | "incomplete"; type: "computer_call";}
{ callId: string; id?: string; output: { data: string; providerData?: Record<string, any>; type: "computer_screenshot"; }; providerData?: Record<string, any>; type: "computer_call_result";}
{ content: object[]; id?: string; providerData?: Record<string, any>; type: "reasoning";}
{ id?: string; providerData?: Record<string, any>; type: "unknown";}
type: string;
Overrides
Section titled “Overrides”RunItemBase.toJSON