콘텐츠로 이동

StreamEventResponseCompleted

이 콘텐츠는 아직 번역되지 않았습니다.

type StreamEventResponseCompleted = object;

Event returned by the model when a response is completed.

optional providerData: Record<string, any>;
response: object;
id: string;
output: (
| {
content: (
| {
providerData?: Record<string, any>;
refusal: string;
type: "refusal";
}
| {
providerData?: Record<string, any>;
text: string;
type: "output_text";
}
| {
audio: | string
| {
id: string;
};
format?: string | null;
providerData?: Record<string, any>;
transcript?: string | null;
type: "audio";
}
| {
image: string;
providerData?: Record<string, any>;
type: "image";
})[];
id?: string;
providerData?: Record<string, any>;
role: "assistant";
status: "completed" | "in_progress" | "incomplete";
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?: "completed" | "in_progress" | "incomplete";
type: "function_call";
}
| {
callId: string;
id?: string;
name: string;
output: | string
| {
providerData?: Record<string, any>;
text: string;
type: "text";
}
| {
detail?: "low" | "high" | "auto" | string & object;
image?: | string
| {
data: string | Uint8Array<...>;
mediaType?: string;
}
| {
url: string;
}
| {
fileId: string;
};
providerData?: Record<string, any>;
type: "image";
}
| {
file: | string
| {
data: string | Uint8Array<...>;
filename: string;
mediaType: string;
}
| {
filename?: string;
url: string;
}
| {
filename?: string;
id: string;
};
providerData?: Record<string, any>;
type: "file";
}
| (
| {
providerData?: Record<..., ...>;
text: string;
type: "input_text";
}
| {
detail?: string;
image?: | string
| {
id: ...;
};
providerData?: Record<..., ...>;
type: "input_image";
}
| {
file?: | string
| {
id: ...;
}
| {
url: ...;
};
filename?: string;
providerData?: Record<..., ...>;
type: "input_file";
})[];
providerData?: Record<string, any>;
status: "completed" | "in_progress" | "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: "completed" | "in_progress" | "incomplete";
type: "computer_call";
}
| {
action: {
commands: string[];
maxOutputLength?: number;
timeoutMs?: number;
};
callId: string;
id?: string;
providerData?: Record<string, any>;
status?: "completed" | "in_progress" | "incomplete";
type: "shell_call";
}
| {
callId: string;
id?: string;
maxOutputLength?: number;
output: objectOutputType<{
outcome: ZodDiscriminatedUnion<"type", [ZodObject<..., ..., ..., ..., ...>, ZodObject<..., ..., ..., ..., ...>]>;
stderr: ZodString;
stdout: ZodString;
}, ZodTypeAny, "passthrough">[];
providerData?: Record<string, any>;
type: "shell_call_output";
}
| {
callId: string;
id?: string;
operation: | {
diff: string;
path: string;
type: "create_file";
}
| {
diff: string;
path: string;
type: "update_file";
}
| {
path: string;
type: "delete_file";
};
providerData?: Record<string, any>;
status: "completed" | "in_progress";
type: "apply_patch_call";
}
| {
callId: string;
id?: string;
output?: string;
providerData?: Record<string, any>;
status: "completed" | "failed";
type: "apply_patch_call_output";
}
| {
content: object[];
id?: string;
providerData?: Record<string, any>;
rawContent?: object[];
type: "reasoning";
}
| {
id?: string;
providerData?: Record<string, any>;
type: "unknown";
})[];
optional providerData: Record<string, any>;
usage: object;
inputTokens: number;
optional inputTokensDetails: Record<string, number> | Record<string, number>[];
outputTokens: number;
optional outputTokensDetails: Record<string, number> | Record<string, number>[];
optional requests: number;
optional requestUsageEntries: object[];
totalTokens: number;
type: "response_done";