mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
4.6.4 (#588)
This commit is contained in:
2
packages/global/common/system/constants.ts
Normal file
2
packages/global/common/system/constants.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export const HUMAN_ICON = `/icon/human.svg`;
|
||||
export const LOGO_ICON = `/icon/logo.svg`;
|
@@ -9,6 +9,7 @@ export type FeConfigsType = {
|
||||
hide_app_flow?: boolean;
|
||||
concatMd?: string;
|
||||
docUrl?: string;
|
||||
chatbotUrl?: string;
|
||||
openAPIDocUrl?: string;
|
||||
systemTitle?: string;
|
||||
googleClientVerKey?: string;
|
||||
|
8
packages/global/core/chat/api.d.ts
vendored
Normal file
8
packages/global/core/chat/api.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export type UpdateChatFeedbackProps = {
|
||||
chatId: string;
|
||||
chatItemId: string;
|
||||
shareId?: string;
|
||||
outLinkUid?: string;
|
||||
userBadFeedback?: string;
|
||||
userGoodFeedback?: string;
|
||||
};
|
@@ -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';
|
||||
|
||||
|
7
packages/global/core/chat/type.d.ts
vendored
7
packages/global/core/chat/type.d.ts
vendored
@@ -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[];
|
||||
};
|
||||
|
3
packages/global/core/dataset/api.d.ts
vendored
3
packages/global/core/dataset/api.d.ts
vendored
@@ -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'>[];
|
||||
};
|
||||
|
||||
|
3
packages/global/core/dataset/type.d.ts
vendored
3
packages/global/core/dataset/type.d.ts
vendored
@@ -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;
|
||||
|
@@ -1,4 +1,22 @@
|
||||
export enum UserStatusEnum {
|
||||
active = 'active',
|
||||
forbidden = 'forbidden'
|
||||
}
|
||||
export const userStatusMap = {
|
||||
[UserStatusEnum.active]: {
|
||||
label: 'support.user.status.active'
|
||||
},
|
||||
[UserStatusEnum.forbidden]: {
|
||||
label: 'support.user.status.forbidden'
|
||||
}
|
||||
};
|
||||
|
||||
export enum OAuthEnum {
|
||||
github = 'github',
|
||||
google = 'google'
|
||||
}
|
||||
|
||||
export enum UserAuthTypeEnum {
|
||||
register = 'register',
|
||||
findPassword = 'findPassword'
|
||||
}
|
||||
|
3
packages/global/support/user/type.d.ts
vendored
3
packages/global/support/user/type.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import { InformTypeEnum } from './constant';
|
||||
import { InformTypeEnum, UserStatusEnum } from './constant';
|
||||
import { TeamItemType } from './team/type';
|
||||
|
||||
export type UserModelSchema = {
|
||||
@@ -12,6 +12,7 @@ export type UserModelSchema = {
|
||||
openaiKey: string;
|
||||
createTime: number;
|
||||
timezone: string;
|
||||
status: `${UserStatusEnum}`;
|
||||
openaiAccount?: {
|
||||
key: string;
|
||||
baseUrl: string;
|
||||
|
Reference in New Issue
Block a user