This commit is contained in:
Archer
2023-12-11 15:12:14 +08:00
committed by GitHub
parent 84cf6b5658
commit d2d7eac9e0
105 changed files with 1091 additions and 801 deletions

8
packages/global/core/chat/api.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
export type UpdateChatFeedbackProps = {
chatId: string;
chatItemId: string;
shareId?: string;
outLinkUid?: string;
userBadFeedback?: string;
userGoodFeedback?: string;
};

View File

@@ -50,9 +50,6 @@ export enum ChatStatusEnum {
finish = 'finish'
}
export const HUMAN_ICON = `/icon/human.svg`;
export const LOGO_ICON = `/icon/logo.svg`;
export const IMG_BLOCK_KEY = 'img-block';
export const FILE_BLOCK_KEY = 'file-block';

View File

@@ -38,7 +38,9 @@ export type ChatItemSchema = {
time: Date;
obj: `${ChatRoleEnum}`;
value: string;
userFeedback?: string;
userGoodFeedback?: string;
userBadFeedback?: string;
robotBadFeedback?: string;
adminFeedback?: AdminFbkType;
[ModuleOutputKeyEnum.responseData]?: ChatHistoryItemResType[];
};
@@ -56,7 +58,8 @@ export type ChatItemType = {
dataId?: string;
obj: ChatItemSchema['obj'];
value: any;
userFeedback?: string;
userGoodFeedback?: string;
userBadFeedback?: string;
adminFeedback?: ChatItemSchema['feedback'];
[ModuleOutputKeyEnum.responseData]?: ChatHistoryItemResType[];
};

View File

@@ -25,6 +25,8 @@ export type CreateDatasetCollectionParams = {
chunkSize?: number;
fileId?: string;
rawLink?: string;
qaPrompt?: string;
hashRawText?: string;
metadata?: Record<string, any>;
};
@@ -40,6 +42,7 @@ export type PgSearchRawType = {
export type PushDatasetDataChunkProps = {
q: string; // embedding content
a?: string; // bonus content
chunkIndex?: number;
indexes?: Omit<DatasetDataIndexItemType, 'dataId'>[];
};

View File

@@ -45,6 +45,8 @@ export type DatasetCollectionSchemaType = {
chunkSize: number;
fileId?: string;
rawLink?: string;
qaPrompt?: string;
hashRawText?: string;
metadata?: Record<string, any>;
};
@@ -134,6 +136,7 @@ export type DatasetDataItemType = {
sourceId?: string;
q: string;
a: string;
chunkIndex: number;
indexes: DatasetDataIndexItemType[];
isOwner: boolean;
canWrite: boolean;