-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathchat.ts
More file actions
50 lines (35 loc) · 1.23 KB
/
chat.ts
File metadata and controls
50 lines (35 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../core/resource';
import * as Shared from '../shared';
import * as CompletionsAPI from './completions';
import {
CompletionCreateParams,
CompletionCreateParamsNonStreaming,
CompletionCreateParamsStreaming,
Completions,
} from './completions';
export class Chat extends APIResource {
completions: CompletionsAPI.Completions = new CompletionsAPI.Completions(this._client);
}
export interface StreamChunk {
id: string;
choices: Array<Shared.Choice>;
created: number;
model: string;
citations?: Array<string> | null;
object?: string;
search_results?: Array<Shared.APIPublicSearchResult> | null;
status?: 'PENDING' | 'COMPLETED' | null;
type?: 'message' | 'info' | 'end_of_stream' | null;
usage?: Shared.UsageInfo | null;
}
Chat.Completions = Completions;
export declare namespace Chat {
export { type StreamChunk as StreamChunk };
export {
Completions as Completions,
type CompletionCreateParams as CompletionCreateParams,
type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming,
type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming,
};
}