Skip to content

Commit aa92d89

Browse files
committed
feat: add chat completionresp
1 parent adc2a00 commit aa92d89

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

src/typings/ChatCompletionResp.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
export type Delta = {
2+
role: string;
3+
content: string;
4+
};
5+
6+
export type Choice = {
7+
index: number;
8+
delta: Delta;
9+
finishReason: string | null;
10+
};
11+
12+
export type ChatCompletionResp = {
13+
id: string;
14+
object: string;
15+
created: number;
16+
model: string;
17+
choices: Array<Choice>;
18+
};

src/typings/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ export * from "./IConversation";
55
export * from "./MsgVectorPayload";
66
export * from "./VectorPoint";
77
export * from "./VectorSearchParams";
8+
export * from "./ChatCompletionResp";

0 commit comments

Comments
 (0)