This commit is contained in:
Archer
2023-11-09 09:46:57 +08:00
committed by GitHub
parent 661ee79943
commit 8bb5588305
402 changed files with 9899 additions and 5967 deletions

View File

@@ -0,0 +1,6 @@
import { ChatMessageItemType } from '@fastgpt/global/core/ai/type.d';
export type CreateQuestionGuideParams = {
messages: ChatMessageItemType[];
shareId?: string;
};

View File

@@ -1,6 +0,0 @@
import { ChatCompletionRequestMessage } from '@fastgpt/global/core/ai/type.d';
export type CreateQuestionGuideParams = {
messages: ChatCompletionRequestMessage[];
shareId?: string;
};

View File

@@ -1,6 +0,0 @@
import { AppListItemType } from '@/types/app';
export type AppListResponse = {
myApps: AppListItemType[];
myCollectionApps: AppListItemType[];
};

View File

@@ -1,5 +0,0 @@
import { MarkDataType } from '../dataset/type';
export type AdminUpdateFeedbackParams = MarkDataType & {
chatItemId: string;
};

View File

@@ -1,20 +0,0 @@
import type { AppSchema } from '@/types/mongoSchema';
import type { ChatItemType } from '@/types/chat';
import { VariableItemType } from '@/types/app';
import type { ModuleItemType } from '@fastgpt/global/core/module/type';
export type InitChatResponse = {
chatId: string;
appId: string;
app: {
userGuideModule?: ModuleItemType;
chatModels?: string[];
name: string;
avatar: string;
intro: string;
canUse?: boolean;
};
title: string;
variables: Record<string, any>;
history: ChatItemType[];
};

View File

@@ -4,6 +4,7 @@ import { TrainingModeEnum } from '@fastgpt/global/core/dataset/constant';
import type { SearchTestItemType } from '@/types/core/dataset';
import { DatasetChunkItemType, UploadChunkItemType } from '@fastgpt/global/core/dataset/type';
import { DatasetCollectionSchemaType } from '@fastgpt/global/core/dataset/type';
import { PermissionTypeEnum } from '@fastgpt/global/support/permission/constant';
/* ===== dataset ===== */
export type DatasetUpdateParams = {
@@ -12,11 +13,12 @@ export type DatasetUpdateParams = {
tags?: string;
name?: string;
avatar?: string;
permission?: `${PermissionTypeEnum}`;
};
export type CreateDatasetParams = {
parentId?: string;
name: string;
tags: string[];
tags: string;
avatar: string;
vectorModel?: string;
type: `${DatasetTypeEnum}`;
@@ -25,6 +27,7 @@ export type CreateDatasetParams = {
export type SearchTestProps = {
datasetId: string;
text: string;
limit?: number;
};
/* ======= collections =========== */
@@ -53,7 +56,6 @@ export type UpdateDatasetCollectionParams = {
/* ==== data ===== */
export type SetOneDatasetDataProps = {
id?: string;
datasetId: string;
collectionId: string;
q?: string; // embedding content
a?: string; // bonus content

View File

@@ -1,7 +1,6 @@
import type { RequestPaging } from '@/types';
import { TrainingModeEnum } from '@/constants/plugin';
import type { SearchTestItemType } from '@/types/core/dataset';
import { DatasetDataItemType } from '@/types/core/dataset/data';
import { DatasetCollectionSchemaType } from '@fastgpt/global/core/dataset/type';
/* ===== dataset ===== */

View File

@@ -1,6 +1,6 @@
import { SystemInputEnum } from '@/constants/app';
import { FlowNodeTypeEnum } from '@fastgpt/global/core/module/node/constant';
import { VariableItemType } from '@/types/app';
import { AppTTSConfigType, VariableItemType } from '@/types/app';
import type { ModuleItemType } from '@fastgpt/global/core/module/type';
export const getGuideModule = (modules: ModuleItemType[]) =>
@@ -17,9 +17,14 @@ export const splitGuideModule = (guideModules?: ModuleItemType) => {
guideModules?.inputs?.find((item) => item.key === SystemInputEnum.questionGuide)?.value ||
false;
const ttsConfig: AppTTSConfigType = guideModules?.inputs?.find(
(item) => item.key === SystemInputEnum.tts
)?.value || { type: 'web' };
return {
welcomeText,
variableModules,
questionGuide
questionGuide,
ttsConfig
};
};

View File

@@ -0,0 +1,7 @@
import type { AppTTSConfigType } from '@/types/app';
export type GetChatSpeechProps = {
chatItemId?: string;
ttsConfig: AppTTSConfigType;
input: string;
};

View File

@@ -7,12 +7,14 @@ import { DatasetCollectionSchemaType } from '@fastgpt/global/core/dataset/type.d
export type DatasetCollectionsListItemType = {
_id: string;
parentId?: string;
tmbId: string;
name: string;
type: DatasetCollectionSchemaType['type'];
updateTime: Date;
dataAmount?: number;
trainingAmount: number;
metadata: DatasetCollectionSchemaType['metadata'];
canWrite: boolean;
};
/* ================= data ===================== */

View File

@@ -1,7 +0,0 @@
export type MarkDataType = {
dataId: string;
datasetId: string;
collectionId: string;
q: string;
a?: string;
};