MCPcopy Create free account
hub / github.com/CodeFox-Repo/codefox / ChatCompletionChunk

Interface ChatCompletionChunk

backend/src/chat/protocol.ts:2–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1/* eslint-disable @typescript-eslint/no-namespace */
2export interface ChatCompletionChunk {
3 /**
4 * A unique identifier for the chat completion. Each chunk has the same ID.
5 */
6 id: string;
7
8 /**
9 * A list of chat completion choices. Can contain more than one elements if `n` is
10 * greater than 1. Can also be empty for the last chunk if you set
11 * `stream_options: {"include_usage": true}`.
12 */
13 choices: Array<ChatCompletionChunk.Choice>;
14
15 /**
16 * The Unix timestamp (in seconds) of when the chat completion was created. Each
17 * chunk has the same timestamp.
18 */
19 created: number;
20
21 /**
22 * The model to generate the completion.
23 */
24 model: string;
25
26 /**
27 * The object type, which is always `chat.completion.chunk`.
28 */
29 object: 'chat.completion.chunk';
30
31 /**
32 * The service tier used for processing the request. This field is only included if
33 * the `service_tier` parameter is specified in the request.
34 */
35 service_tier?: 'scale' | 'default' | null;
36
37 /**
38 * This fingerprint represents the backend configuration that the model runs with.
39 * Can be used in conjunction with the `seed` request parameter to understand when
40 * backend changes have been made that might impact determinism.
41 */
42 system_fingerprint?: string;
43}
44
45export namespace ChatCompletionChunk {
46 export interface Choice {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected