Type alias OpenAIChatResponse
OpenAIChatResponse: { choices: { finish_reason: "stop" | "length" | "content_filter" | "tool_calls"; index: number; message: { content: string; role: string; tool_calls?: { function: { arguments: string; name: string; }; id: string; type: "function"; }[]; }; }[]; created: number; error?: { code: number; message: string; param: string; type: string; }; id: string; model: string; object: "chat.completion"; system_fingerprint: string; usage?: OpenAIUsage; } Type declaration
choices: {
finish_reason: "stop" | "length" | "content_filter" | "tool_calls";
index: number;
message: {
content: string;
role: string;
tool_calls?: {
function: {
arguments: string;
name: string;
};
id: string;
type: "function";
}[];
};
}[]
created: number
Optional
error?: {
code: number;
message: string;
param: string;
type: string;
}
code: number
message: string
param: string
type: string
id: string
model: string
object: "chat.completion"
system_fingerprint: string