-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel.ts
57 lines (49 loc) · 1.09 KB
/
model.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 type AskResponse = {
answer: string;
citations: Citation[];
error?: string;
};
export type Citation = {
content: string;
id: string;
title: string | null;
filepath: string | null;
url: string | null;
metadata: string | null;
chunk_id: string | null;
reindex_id: string | null;
}
export enum CardType {
OpenUrl = "Action.OpenUrl",
ShowCard = "Action.ShowCard",
AdaptiveCard = "AdaptiveCard",
TextBlock = "TextBlock"
}
export type ToolMessageContent = {
citations: Citation[];
intent: string;
}
export type ChatMessage = {
role: string;
content: string;
end_turn?: boolean;
};
export enum ChatCompletionType {
ChatCompletion = "chat.completion",
ChatCompletionChunk = "chat.completion.chunk"
}
export type ChatResponseChoice = {
messages: ChatMessage[];
}
export type ChatResponse = {
id: string;
model: string;
created: number;
object: ChatCompletionType;
choices: ChatResponseChoice[];
error: string;
}
export type ConversationRequest = {
id?: string;
messages: ChatMessage[];
};