Skip to content

Commit

Permalink
feat: add chat completionresp
Browse files Browse the repository at this point in the history
  • Loading branch information
ccbond committed Aug 4, 2023
1 parent adc2a00 commit aa92d89
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/typings/ChatCompletionResp.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export type Delta = {
role: string;
content: string;
};

export type Choice = {
index: number;
delta: Delta;
finishReason: string | null;
};

export type ChatCompletionResp = {
id: string;
object: string;
created: number;
model: string;
choices: Array<Choice>;
};
1 change: 1 addition & 0 deletions src/typings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ export * from "./IConversation";
export * from "./MsgVectorPayload";
export * from "./VectorPoint";
export * from "./VectorSearchParams";
export * from "./ChatCompletionResp";

0 comments on commit aa92d89

Please sign in to comment.