forked from guangzhengli/ChatFiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
57 lines (48 loc) · 964 Bytes
/
index.ts
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
51
52
53
54
55
56
57
export enum ModelType {
OPENAI = 'OPENAI',
AZURE_OPENAI = 'AZURE_OPENAI',
}
export interface Message {
role: Role;
content: string;
}
export type Role = 'assistant' | 'user';
export interface ChatFolder {
id: number;
name: string;
}
export interface Conversation {
id: number;
name: string;
messages: Message[];
prompt: string;
folderId: number;
index: LlamaIndex;
}
export interface ChatBody {
messages: Message[];
prompt: string;
}
export interface KeyValuePair {
key: string;
value: any;
}
export interface ErrorMessage {
code: String | null;
title: String;
messageLines: String[];
}
export interface LlamaIndex {
indexName: string;
indexType: string;
}
export interface KeyConfiguration {
apiType?: ModelType;
apiKey?: string;
apiModel?: string;
azureApiKey?: string;
azureInstanceName?: string;
azureApiVersion?: string;
azureDeploymentName?: string;
azureEmbeddingDeploymentName?: string;
}