Skip to main content

Type Alias: GatewayInferenceCreateCompletionResponse

type GatewayInferenceCreateCompletionResponse = {
[key: string]: unknown;
id: string;
choices: {
[key: string]: unknown;
finish_reason: "stop" | "length" | "content_filter" | null;
index: number;
logprobs: | {
[key: string]: unknown;
text_offset?: number[];
token_logprobs?: number[];
tokens?: string[];
top_logprobs?: {
[key: string]: unknown;
}[];
}
| null;
text: string;
}[];
created: number;
model: string;
system_fingerprint?: string | null;
object: "text_completion";
usage?: | GatewayInferenceCompletionUsage
| null;
};

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

Portkey CreateCompletionResponse; additive response fields are preserved.

Example​

`GatewayInferenceCreateCompletionResponseSchema.parse(value);`

Indexable​

[key: string]: unknown

Properties​

id​

id: string;

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


choices​

choices: {
[key: string]: unknown;
finish_reason: "stop" | "length" | "content_filter" | null;
index: number;
logprobs: | {
[key: string]: unknown;
text_offset?: number[];
token_logprobs?: number[];
tokens?: string[];
top_logprobs?: {
[key: string]: unknown;
}[];
}
| null;
text: string;
}[];

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

Index Signature​

[key: string]: unknown

finish_reason​

finish_reason: "stop" | "length" | "content_filter" | null;

index​

index: number;

logprobs​

logprobs:
| {
[key: string]: unknown;
text_offset?: number[];
token_logprobs?: number[];
tokens?: string[];
top_logprobs?: {
[key: string]: unknown;
}[];
}
| null;

text​

text: string;

created​

created: number;

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


model​

model: string;

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


system_fingerprint?​

optional system_fingerprint?: string | null;

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


object​

object: "text_completion";

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


usage?​

optional usage?:
| GatewayInferenceCompletionUsage
| null;

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