Skip to main content

Type Alias: GatewayInferenceCreateChatCompletionResponse

type GatewayInferenceCreateChatCompletionResponse = {
[key: string]: unknown;
id: string;
choices: {
[key: string]: unknown;
finish_reason: "stop" | "length" | "tool_calls" | "content_filter" | "function_call";
index: number;
message: GatewayInferenceChatCompletionResponseMessage;
logprobs?: | {
[key: string]: unknown;
content: | GatewayInferenceChatCompletionTokenLogprob[]
| null;
}
| null;
}[];
created: number;
model: string;
system_fingerprint?: string | null;
object: "chat.completion";
usage?: GatewayInferenceCompletionUsage;
};

Defined in: src/models/ai-gateway-inference.ts:841

Portkey CreateChatCompletionResponse; additive response fields are preserved.

Example​

`GatewayInferenceCreateChatCompletionResponseSchema.parse(value);`

Indexable​

[key: string]: unknown

Properties​

id​

id: string;

Defined in: src/models/ai-gateway-inference.ts:842


choices​

choices: {
[key: string]: unknown;
finish_reason: "stop" | "length" | "tool_calls" | "content_filter" | "function_call";
index: number;
message: GatewayInferenceChatCompletionResponseMessage;
logprobs?: | {
[key: string]: unknown;
content: | GatewayInferenceChatCompletionTokenLogprob[]
| null;
}
| null;
}[];

Defined in: src/models/ai-gateway-inference.ts:843

Index Signature​

[key: string]: unknown

finish_reason​

finish_reason: "stop" | "length" | "tool_calls" | "content_filter" | "function_call";

index​

index: number;

message​

message: GatewayInferenceChatCompletionResponseMessage;

logprobs?​

optional logprobs?:
| {
[key: string]: unknown;
content: | GatewayInferenceChatCompletionTokenLogprob[]
| null;
}
| null;

created​

created: number;

Defined in: src/models/ai-gateway-inference.ts:853


model​

model: string;

Defined in: src/models/ai-gateway-inference.ts:854


system_fingerprint?​

optional system_fingerprint?: string | null;

Defined in: src/models/ai-gateway-inference.ts:855


object​

object: "chat.completion";

Defined in: src/models/ai-gateway-inference.ts:856


usage?​

optional usage?: GatewayInferenceCompletionUsage;

Defined in: src/models/ai-gateway-inference.ts:857