feat: Update flow translations for Chinese and English locales

This commit is contained in:
谨欣
2024-08-23 01:37:42 +08:00
parent 904fe28b64
commit 1918c76f0c
10 changed files with 1951 additions and 852 deletions

View File

@@ -4,8 +4,8 @@ import {
PostAgentMyPluginResponse,
PostAgentPluginResponse,
PostAgentQueryParams,
} from '@/types/agent';
import { GetAppInfoParams, IApp, IAgent, IAppData } from '@/types/app';
} from "@/types/agent";
import { GetAppInfoParams, IApp, IAgent, IAppData } from "@/types/app";
import {
ChatHistoryResponse,
DialogueListResponse,
@@ -16,8 +16,14 @@ import {
SceneResponse,
UserParam,
UserParamResponse,
} from '@/types/chat';
import { ChatFeedBackSchema, DbListResponse, DbSupportTypeResponse, PostDbParams, PostDbRefreshParams } from '@/types/db';
} from "@/types/chat";
import {
ChatFeedBackSchema,
DbListResponse,
DbSupportTypeResponse,
PostDbParams,
PostDbRefreshParams,
} from "@/types/db";
import {
GetEditorSQLRoundRequest,
GetEditorySqlParams,
@@ -25,8 +31,7 @@ import {
PostEditorChartRunResponse,
PostEditorSQLRunParams,
PostSQLEditorSubmitParams,
} from '@/types/editor';
import { IFlow, IFlowNode, IFlowUpdateParam, IFlowResponse } from '@/types/flow';
} from "@/types/editor";
import {
AddKnowledgeParams,
ArgumentsParams,
@@ -41,11 +46,16 @@ import {
ISyncBatchParameter,
ISyncBatchResponse,
SpaceConfig,
} from '@/types/knowledge';
import { BaseModelParams, IModelData, StartModelParams, SupportModel } from '@/types/model';
import { AxiosRequestConfig } from 'axios';
import { DELETE, GET, POST, PUT } from '.';
import { UpdatePromptParams, IPrompt, PromptParams } from '@/types/prompt';
} from "@/types/knowledge";
import {
BaseModelParams,
IModelData,
StartModelParams,
SupportModel,
} from "@/types/model";
import { AxiosRequestConfig } from "axios";
import { DELETE, GET, POST, PUT } from ".";
import { UpdatePromptParams, IPrompt, PromptParams } from "@/types/prompt";
import {
IFlow,
IFlowNode,
@@ -56,59 +66,67 @@ import {
IFlowImportParams,
IUploadFileRequestParams,
IUploadFileResponse,
} from '@/types/flow';
import { IAgent, IApp, IAppData } from '@/types/app';
} from "@/types/flow";
/** App */
export const postScenes = () => {
return POST<null, Array<SceneResponse>>('/api/v1/chat/dialogue/scenes');
return POST<null, Array<SceneResponse>>("/api/v1/chat/dialogue/scenes");
};
export const newDialogue = (data: NewDialogueParam) => {
return POST<NewDialogueParam, IChatDialogueSchema>(`/api/v1/chat/dialogue/new?chat_mode=${data.chat_mode}&model_name=${data.model}`, data);
return POST<NewDialogueParam, IChatDialogueSchema>(
`/api/v1/chat/dialogue/new?chat_mode=${data.chat_mode}&model_name=${data.model}`,
data
);
};
export const addUser = (data: UserParam) => {
return POST<UserParam, UserParamResponse>('/api/v1/user/add', data);
return POST<UserParam, UserParamResponse>("/api/v1/user/add", data);
};
/** Database Page */
export const getDbList = () => {
return GET<null, DbListResponse>('/api/v1/chat/db/list');
return GET<null, DbListResponse>("/api/v1/chat/db/list");
};
export const getDbSupportType = () => {
return GET<null, DbSupportTypeResponse>('/api/v1/chat/db/support/type');
return GET<null, DbSupportTypeResponse>("/api/v1/chat/db/support/type");
};
export const postDbDelete = (dbName: string) => {
return POST(`/api/v1/chat/db/delete?db_name=${dbName}`);
};
export const postDbEdit = (data: PostDbParams) => {
return POST<PostDbParams, null>('/api/v1/chat/db/edit', data);
return POST<PostDbParams, null>("/api/v1/chat/db/edit", data);
};
export const postDbAdd = (data: PostDbParams) => {
return POST<PostDbParams, null>('/api/v1/chat/db/add', data);
return POST<PostDbParams, null>("/api/v1/chat/db/add", data);
};
export const postDbTestConnect = (data: PostDbParams) => {
return POST<PostDbParams, null>('/api/v1/chat/db/test/connect', data);
return POST<PostDbParams, null>("/api/v1/chat/db/test/connect", data);
};
export const postDbRefresh = (data: PostDbRefreshParams) => {
return POST<PostDbRefreshParams, boolean>('/api/v1/chat/db/refresh', data);
return POST<PostDbRefreshParams, boolean>("/api/v1/chat/db/refresh", data);
};
/** Chat Page */
export const getDialogueList = () => {
return GET<null, DialogueListResponse>('/api/v1/chat/dialogue/list');
return GET<null, DialogueListResponse>("/api/v1/chat/dialogue/list");
};
export const getUsableModels = () => {
return GET<null, Array<string>>('/api/v1/model/types');
return GET<null, Array<string>>("/api/v1/model/types");
};
export const postChatModeParamsList = (chatMode: string) => {
return POST<null, IDB[]>(`/api/v1/chat/mode/params/list?chat_mode=${chatMode}`);
return POST<null, IDB[]>(
`/api/v1/chat/mode/params/list?chat_mode=${chatMode}`
);
};
export const postChatModeParamsInfoList = (chatMode: string) => {
return POST<null, Record<string, string>>(`/api/v1/chat/mode/params/info?chat_mode=${chatMode}`);
return POST<null, Record<string, string>>(
`/api/v1/chat/mode/params/info?chat_mode=${chatMode}`
);
};
export const getChatHistory = (convId: string) => {
return GET<null, ChatHistoryResponse>(`/api/v1/chat/dialogue/messages/history?con_uid=${convId}`);
return GET<null, ChatHistoryResponse>(
`/api/v1/chat/dialogue/messages/history?con_uid=${convId}`
);
};
export const postChatModeParamsFileLoad = ({
convUid,
@@ -125,22 +143,24 @@ export const postChatModeParamsFileLoad = ({
model: string;
userName?: string;
sysCode?: string;
config?: Omit<AxiosRequestConfig, 'headers'>;
config?: Omit<AxiosRequestConfig, "headers">;
}) => {
return POST<FormData, any>(
`/api/v1/resource/file/upload?conv_uid=${convUid}&chat_mode=${chatMode}&model_name=${model}&user_name=${userName}&sys_code=${sysCode}`,
data,
{
headers: {
'Content-Type': 'multipart/form-data',
"Content-Type": "multipart/form-data",
},
...config,
},
}
);
};
export const clearChatHistory = (conUid: string) => {
return POST<null, Record<string, string>>(`/api/v1/chat/dialogue/clear?con_uid=${conUid}`);
return POST<null, Record<string, string>>(
`/api/v1/chat/dialogue/clear?con_uid=${conUid}`
);
};
/** Menu */
@@ -150,19 +170,27 @@ export const delDialogue = (conv_uid: string) => {
/** Editor */
export const getEditorSqlRounds = (id: string) => {
return GET<null, GetEditorSQLRoundRequest>(`/api/v1/editor/sql/rounds?con_uid=${id}`);
return GET<null, GetEditorSQLRoundRequest>(
`/api/v1/editor/sql/rounds?con_uid=${id}`
);
};
export const postEditorSqlRun = (data: PostEditorSQLRunParams) => {
return POST<PostEditorSQLRunParams>(`/api/v1/editor/sql/run`, data);
};
export const postEditorChartRun = (data: PostEditorChartRunParams) => {
return POST<PostEditorChartRunParams, PostEditorChartRunResponse>(`/api/v1/editor/chart/run`, data);
return POST<PostEditorChartRunParams, PostEditorChartRunResponse>(
`/api/v1/editor/chart/run`,
data
);
};
export const postSqlEditorSubmit = (data: PostSQLEditorSubmitParams) => {
return POST<PostSQLEditorSubmitParams>(`/api/v1/sql/editor/submit`, data);
};
export const getEditorSql = (id: string, round: string | number) => {
return POST<GetEditorySqlParams, string | Array<any>>('/api/v1/editor/sql', { con_uid: id, round });
return POST<GetEditorySqlParams, string | Array<any>>("/api/v1/editor/sql", {
con_uid: id,
round,
});
};
/** knowledge */
@@ -170,21 +198,36 @@ export const getArguments = (knowledgeName: string) => {
return POST<any, IArguments>(`/knowledge/${knowledgeName}/arguments`, {});
};
export const saveArguments = (knowledgeName: string, data: ArgumentsParams) => {
return POST<ArgumentsParams, IArguments>(`/knowledge/${knowledgeName}/argument/save`, data);
return POST<ArgumentsParams, IArguments>(
`/knowledge/${knowledgeName}/argument/save`,
data
);
};
export const getSpaceList = (data: any) => {
return POST<any, Array<ISpace>>('/knowledge/space/list', data);
return POST<any, Array<ISpace>>("/knowledge/space/list", data);
};
export const getDocumentList = (spaceName: string, data: Record<string, number | Array<number>>) => {
return POST<Record<string, number | Array<number>>, IDocumentResponse>(`/knowledge/${spaceName}/document/list`, data);
export const getDocumentList = (
spaceName: string,
data: Record<string, number | Array<number>>
) => {
return POST<Record<string, number | Array<number>>, IDocumentResponse>(
`/knowledge/${spaceName}/document/list`,
data
);
};
export const getGraphVis = (spaceName: string, data: { limit: number }) => {
return POST<Record<string, number>, GraphVisResult>(`/knowledge/${spaceName}/graphvis`, data);
return POST<Record<string, number>, GraphVisResult>(
`/knowledge/${spaceName}/graphvis`,
data
);
};
export const addDocument = (knowledgeName: string, data: DocumentParams) => {
return POST<DocumentParams, number>(`/knowledge/${knowledgeName}/document/add`, data);
return POST<DocumentParams, number>(
`/knowledge/${knowledgeName}/document/add`,
data
);
};
export const addSpace = (data: AddKnowledgeParams) => {
@@ -192,27 +235,53 @@ export const addSpace = (data: AddKnowledgeParams) => {
};
export const getChunkStrategies = () => {
return GET<null, Array<IChunkStrategyResponse>>('/knowledge/document/chunkstrategies');
return GET<null, Array<IChunkStrategyResponse>>(
"/knowledge/document/chunkstrategies"
);
};
export const syncDocument = (spaceName: string, data: Record<string, Array<number>>) => {
return POST<Record<string, Array<number>>, string | null>(`/knowledge/${spaceName}/document/sync`, data);
export const syncDocument = (
spaceName: string,
data: Record<string, Array<number>>
) => {
return POST<Record<string, Array<number>>, string | null>(
`/knowledge/${spaceName}/document/sync`,
data
);
};
export const syncBatchDocument = (spaceName: string, data: Array<ISyncBatchParameter>) => {
return POST<Array<ISyncBatchParameter>, ISyncBatchResponse>(`/knowledge/${spaceName}/document/sync_batch`, data);
export const syncBatchDocument = (
spaceName: string,
data: Array<ISyncBatchParameter>
) => {
return POST<Array<ISyncBatchParameter>, ISyncBatchResponse>(
`/knowledge/${spaceName}/document/sync_batch`,
data
);
};
export const uploadDocument = (knowLedgeName: string, data: FormData) => {
return POST<FormData, number>(`/knowledge/${knowLedgeName}/document/upload`, data);
return POST<FormData, number>(
`/knowledge/${knowLedgeName}/document/upload`,
data
);
};
export const getChunkList = (spaceName: string, data: ChunkListParams) => {
return POST<ChunkListParams, IChunkList>(`/knowledge/${spaceName}/chunk/list`, data);
return POST<ChunkListParams, IChunkList>(
`/knowledge/${spaceName}/chunk/list`,
data
);
};
export const delDocument = (spaceName: string, data: Record<string, number>) => {
return POST<Record<string, number>, null>(`/knowledge/${spaceName}/document/delete`, data);
export const delDocument = (
spaceName: string,
data: Record<string, number>
) => {
return POST<Record<string, number>, null>(
`/knowledge/${spaceName}/document/delete`,
data
);
};
export const delSpace = (data: Record<string, string>) => {
@@ -221,48 +290,68 @@ export const delSpace = (data: Record<string, string>) => {
/** models */
export const getModelList = () => {
return GET<null, Array<IModelData>>('/api/v1/worker/model/list');
return GET<null, Array<IModelData>>("/api/v1/worker/model/list");
};
export const stopModel = (data: BaseModelParams) => {
return POST<BaseModelParams, boolean>('/api/v1/worker/model/stop', data);
return POST<BaseModelParams, boolean>("/api/v1/worker/model/stop", data);
};
export const startModel = (data: StartModelParams) => {
return POST<StartModelParams, boolean>('/api/v1/worker/model/start', data);
return POST<StartModelParams, boolean>("/api/v1/worker/model/start", data);
};
export const getSupportModels = () => {
return GET<null, Array<SupportModel>>('/api/v1/worker/model/params');
return GET<null, Array<SupportModel>>("/api/v1/worker/model/params");
};
/** Agent */
export const postAgentQuery = (data: PostAgentQueryParams) => {
return POST<PostAgentQueryParams, PostAgentPluginResponse>('/api/v1/agent/query', data);
return POST<PostAgentQueryParams, PostAgentPluginResponse>(
"/api/v1/agent/query",
data
);
};
export const postAgentHubUpdate = (data?: PostAgentHubUpdateParams) => {
return POST<PostAgentHubUpdateParams>('/api/v1/agent/hub/update', data ?? { channel: '', url: '', branch: '', authorization: '' });
return POST<PostAgentHubUpdateParams>(
"/api/v1/agent/hub/update",
data ?? { channel: "", url: "", branch: "", authorization: "" }
);
};
export const postAgentMy = (user?: string) => {
return POST<undefined, PostAgentMyPluginResponse>('/api/v1/agent/my', undefined, { params: { user } });
return POST<undefined, PostAgentMyPluginResponse>(
"/api/v1/agent/my",
undefined,
{ params: { user } }
);
};
export const postAgentInstall = (pluginName: string, user?: string) => {
return POST('/api/v1/agent/install', undefined, { params: { plugin_name: pluginName, user }, timeout: 60000 });
return POST("/api/v1/agent/install", undefined, {
params: { plugin_name: pluginName, user },
timeout: 60000,
});
};
export const postAgentUninstall = (pluginName: string, user?: string) => {
return POST('/api/v1/agent/uninstall', undefined, { params: { plugin_name: pluginName, user }, timeout: 60000 });
return POST("/api/v1/agent/uninstall", undefined, {
params: { plugin_name: pluginName, user },
timeout: 60000,
});
};
export const postAgentUpload = (user = '', data: FormData, config?: Omit<AxiosRequestConfig, 'headers'>) => {
return POST<FormData>('/api/v1/personal/agent/upload', data, {
export const postAgentUpload = (
user = "",
data: FormData,
config?: Omit<AxiosRequestConfig, "headers">
) => {
return POST<FormData>("/api/v1/personal/agent/upload", data, {
params: { user },
headers: {
'Content-Type': 'multipart/form-data',
"Content-Type": "multipart/form-data",
},
...config,
});
};
export const getDbgptsList = () => {
return GET<undefined, GetDBGPTsListResponse>('/api/v1/dbgpts/list');
return GET<undefined, GetDBGPTsListResponse>("/api/v1/dbgpts/list");
};
/** chat feedback **/
@@ -270,12 +359,21 @@ export const getChatFeedBackSelect = () => {
return GET<null, FeedBack>(`/api/v1/feedback/select`, undefined);
};
export const getChatFeedBackItme = (conv_uid: string, conv_index: number) => {
return GET<null, Record<string, string>>(`/api/v1/feedback/find?conv_uid=${conv_uid}&conv_index=${conv_index}`, undefined);
return GET<null, Record<string, string>>(
`/api/v1/feedback/find?conv_uid=${conv_uid}&conv_index=${conv_index}`,
undefined
);
};
export const postChatFeedBackForm = ({ data, config }: { data: ChatFeedBackSchema; config?: Omit<AxiosRequestConfig, 'headers'> }) => {
export const postChatFeedBackForm = ({
data,
config,
}: {
data: ChatFeedBackSchema;
config?: Omit<AxiosRequestConfig, "headers">;
}) => {
return POST<ChatFeedBackSchema, any>(`/api/v1/feedback/commit`, data, {
headers: {
'Content-Type': 'application/json',
"Content-Type": "application/json",
},
...config,
});
@@ -285,11 +383,11 @@ export const postChatFeedBackForm = ({ data, config }: { data: ChatFeedBackSchem
/** AWEL Flow */
export const addFlow = (data: IFlowUpdateParam) => {
return POST<IFlowUpdateParam, IFlow>('/api/v2/serve/awel/flows', data);
return POST<IFlowUpdateParam, IFlow>("/api/v2/serve/awel/flows", data);
};
export const getFlows = (page?: number, page_size?: number) => {
return GET<any, IFlowResponse>('/api/v2/serve/awel/flows', {
return GET<any, IFlowResponse>("/api/v2/serve/awel/flows", {
page,
page_size,
});
@@ -312,23 +410,32 @@ export const getFlowNodes = () => {
};
export const refreshFlowNodeById = (data: IFlowRefreshParams) => {
return POST<IFlowRefreshParams, IFlowNode>('/api/v2/serve/awel/nodes/refresh', data);
return POST<IFlowRefreshParams, IFlowNode>(
"/api/v2/serve/awel/nodes/refresh",
data
);
};
export const debugFlow = (data: any) => {
return POST<any, IFlowNode>('/api/v2/serve/awel/flow/debug', data);
return POST<any, IFlowNode>("/api/v2/serve/awel/flow/debug", data);
};
export const exportFlow = (data: IFlowExportParams) => {
return GET<IFlowExportParams, any>(`/api/v2/serve/awel/flow/export/${data.uid}`, data);
return GET<IFlowExportParams, any>(
`/api/v2/serve/awel/flow/export/${data.uid}`,
data
);
};
export const importFlow = (data: IFlowImportParams) => {
return POST<IFlowImportParams, any>('/api/v2/serve/awel/flow/import', data);
return POST<IFlowImportParams, any>("/api/v2/serve/awel/flow/import", data);
};
export const uploadFile = (data: IUploadFileRequestParams) => {
return POST<IUploadFileRequestParams, Array<IUploadFileResponse>>('/api/v2/serve/file/files/dbgpt', data);
return POST<IUploadFileRequestParams, Array<IUploadFileResponse>>(
"/api/v2/serve/file/files/dbgpt",
data
);
};
export const downloadFile = (fileId: string) => {
@@ -337,7 +444,7 @@ export const downloadFile = (fileId: string) => {
// TODOwait for interface update
export const getFlowTemplateList = () => {
return GET<null, Array<any>>('/api/v2/serve/awel/flow/templates');
return GET<null, Array<any>>("/api/v2/serve/awel/flow/templates");
};
export const getFlowTemplateById = (id: string) => {
@@ -347,48 +454,52 @@ export const getFlowTemplateById = (id: string) => {
/** app */
export const collectApp = (data: Record<string, string>) => {
return POST<Record<string, string>, []>('/api/v1/app/collect', data);
return POST<Record<string, string>, []>("/api/v1/app/collect", data);
};
export const unCollectApp = (data: Record<string, string>) => {
return POST<Record<string, string>, []>('/api/v1/app/uncollect', data);
return POST<Record<string, string>, []>("/api/v1/app/uncollect", data);
};
export const getResourceType = () => {
return GET<null, string[]>('/api/v1/resource-type/list');
return GET<null, string[]>("/api/v1/resource-type/list");
};
export const publishApp = (app_code: string) => {
return POST<Record<string, any>, []>('/api/v1/app/publish', { app_code });
return POST<Record<string, any>, []>("/api/v1/app/publish", { app_code });
};
export const unPublishApp = (app_code: string) => {
return POST<Record<string, any>, []>('/api/v1/app/unpublish', { app_code });
return POST<Record<string, any>, []>("/api/v1/app/unpublish", { app_code });
};
export const addOmcDB = (params: Record<string, string>) => {
return POST<Record<string, any>, []>('/api/v1/chat/db/add', params);
return POST<Record<string, any>, []>("/api/v1/chat/db/add", params);
};
export const getAppInfo = (data: GetAppInfoParams) => {
return GET<GetAppInfoParams, IApp>('/api/v1/app/info', data);
return GET<GetAppInfoParams, IApp>("/api/v1/app/info", data);
};
export const getSupportDBList = (db_name = '') => {
return GET<null, Record<string, any>>(`/api/v1/permission/db/list?db_name=${db_name}`);
export const getSupportDBList = (db_name = "") => {
return GET<null, Record<string, any>>(
`/api/v1/permission/db/list?db_name=${db_name}`
);
};
export const recommendApps = (data: Record<string, string>) => {
return POST<Record<string, string>, []>('/api/v1/app/hot/list', data);
return POST<Record<string, string>, []>("/api/v1/app/hot/list", data);
};
export const flowSearch = (data: Record<string, string>) => {
return POST<Record<string, string>, []>('/api/v1/serve/awel/flows', data);
return POST<Record<string, string>, []>("/api/v1/serve/awel/flows", data);
};
export const modelSearch = (data: Record<string, string>) => {
return POST<Record<string, string>, []>('/api/controller/models', data);
return POST<Record<string, string>, []>("/api/controller/models", data);
};
export const getKnowledgeAdmins = (spaceId: string) => {
return GET<string, Record<string, any>>(`/knowledge/users/list?space_id=${spaceId}`);
return GET<string, Record<string, any>>(
`/knowledge/users/list?space_id=${spaceId}`
);
};
export const updateKnowledgeAdmins = (data: Record<string, string>) => {
return POST<Record<string, any>, any[]>(`/knowledge/users/update`, data);
@@ -398,7 +509,7 @@ export const updateKnowledgeAdmins = (data: Record<string, string>) => {
/** app */
export const delApp = (data: Record<string, string>) => {
return POST<Record<string, string>, []>('/api/v1/app/remove', data);
return POST<Record<string, string>, []>("/api/v1/app/remove", data);
};
export const getSpaceConfig = () => {

View File

@@ -1,8 +1,8 @@
import { Modal, Form, Input, Button, Space, Radio, message } from 'antd';
import { IFlowData, IFlowUpdateParam } from '@/types/flow';
import { apiInterceptors, exportFlow } from '@/client/api';
import { ReactFlowInstance } from 'reactflow';
import { useTranslation } from 'react-i18next';
import { Modal, Form, Input, Button, Space, Radio, message } from "antd";
import { IFlowData, IFlowUpdateParam } from "@/types/flow";
import { apiInterceptors, exportFlow } from "@/client/api";
import { ReactFlowInstance } from "reactflow";
import { useTranslation } from "react-i18next";
type Props = {
reactFlow: ReactFlowInstance<any, any>;
@@ -11,24 +11,31 @@ type Props = {
setIsExportFlowModalOpen: (value: boolean) => void;
};
export const ExportFlowModal: React.FC<Props> = ({ reactFlow, flowInfo, isExportFlowModalOpen, setIsExportFlowModalOpen }) => {
export const ExportFlowModal: React.FC<Props> = ({
reactFlow,
flowInfo,
isExportFlowModalOpen,
setIsExportFlowModalOpen,
}) => {
const { t } = useTranslation();
const [form] = Form.useForm();
const [messageApi, contextHolder] = message.useMessage();
const onFlowExport = async (values: any) => {
const flowData = reactFlow.toObject() as IFlowData;
const blob = new Blob([JSON.stringify(flowData)], { type: 'text/plain;charset=utf-8' });
const blob = new Blob([JSON.stringify(flowData)], {
type: "text/plain;charset=utf-8",
});
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
const a = document.createElement("a");
a.href = url;
a.download = values.file_name || 'flow.json';
a.download = values.file_name || "flow.json";
a.click();
const [, , res] = await apiInterceptors(exportFlow(values));
if (res?.success) {
messageApi.success(t('export_flow_success'));
messageApi.success(t("Export_Flow_Success"));
} else if (res?.err_msg) {
messageApi.error(res?.err_msg);
}
@@ -38,20 +45,29 @@ export const ExportFlowModal: React.FC<Props> = ({ reactFlow, flowInfo, isExport
return (
<>
<Modal title="Export Flow" open={isExportFlowModalOpen} onCancel={() => setIsExportFlowModalOpen(false)} footer={null}>
<Modal
title="Export Flow"
open={isExportFlowModalOpen}
onCancel={() => setIsExportFlowModalOpen(false)}
footer={null}
>
<Form
form={form}
labelCol={{ span: 6 }}
wrapperCol={{ span: 16 }}
initialValues={{
export_type: 'json',
format: 'file',
file_name: 'flow.json',
export_type: "json",
format: "file",
file_name: "flow.json",
uid: flowInfo?.uid,
}}
onFinish={onFlowExport}
>
<Form.Item label="File Name" name="file_name" rules={[{ required: true, message: 'Please input file name!' }]}>
<Form.Item
label="File Name"
name="file_name"
rules={[{ required: true, message: "Please input file name!" }]}
>
<Input placeholder="file.json" />
</Form.Item>
@@ -75,7 +91,9 @@ export const ExportFlowModal: React.FC<Props> = ({ reactFlow, flowInfo, isExport
<Form.Item wrapperCol={{ offset: 14, span: 8 }}>
<Space>
<Button onClick={() => setIsExportFlowModalOpen(false)}>Cancel</Button>
<Button onClick={() => setIsExportFlowModalOpen(false)}>
Cancel
</Button>
<Button type="primary" htmlType="submit">
Export
</Button>

View File

@@ -1,17 +1,24 @@
import { Modal, Form, Button, Space, message, Checkbox, Upload } from 'antd';
import { apiInterceptors, importFlow } from '@/client/api';
import { Node, Edge } from 'reactflow';
import { UploadOutlined } from '@mui/icons-material';
import { t } from 'i18next';
import { Modal, Form, Button, Space, message, Checkbox, Upload } from "antd";
import { apiInterceptors, importFlow } from "@/client/api";
import { Node, Edge } from "reactflow";
import { UploadOutlined } from "@mui/icons-material";
import { t } from "i18next";
type Props = {
isImportModalOpen: boolean;
setNodes: React.Dispatch<React.SetStateAction<Node<any, string | undefined>[]>>;
setNodes: React.Dispatch<
React.SetStateAction<Node<any, string | undefined>[]>
>;
setEdges: React.Dispatch<React.SetStateAction<Edge<any>[]>>;
setIsImportFlowModalOpen: (value: boolean) => void;
};
export const ImportFlowModal: React.FC<Props> = ({ setNodes, setEdges, isImportModalOpen, setIsImportFlowModalOpen }) => {
export const ImportFlowModal: React.FC<Props> = ({
setNodes,
setEdges,
isImportModalOpen,
setIsImportFlowModalOpen,
}) => {
const [form] = Form.useForm();
const [messageApi, contextHolder] = message.useMessage();
@@ -37,7 +44,7 @@ export const ImportFlowModal: React.FC<Props> = ({ setNodes, setEdges, isImportM
const [, , res] = await apiInterceptors(importFlow(values));
if (res?.success) {
messageApi.success(t('export_flow_success'));
messageApi.success(t("Export_Flow_Success"));
} else if (res?.err_msg) {
messageApi.error(res?.err_msg);
}
@@ -47,14 +54,24 @@ export const ImportFlowModal: React.FC<Props> = ({ setNodes, setEdges, isImportM
return (
<>
<Modal title="Import Flow" open={isImportModalOpen} onCancel={() => setIsImportFlowModalOpen(false)} footer={null}>
<Form form={form} labelCol={{ span: 6 }} wrapperCol={{ span: 16 }} onFinish={onFlowImport}>
<Modal
title="Import Flow"
open={isImportModalOpen}
onCancel={() => setIsImportFlowModalOpen(false)}
footer={null}
>
<Form
form={form}
labelCol={{ span: 6 }}
wrapperCol={{ span: 16 }}
onFinish={onFlowImport}
>
<Form.Item
name="file"
label="File"
valuePropName="fileList"
getValueFromEvent={(e) => (Array.isArray(e) ? e : e && e.fileList)}
rules={[{ required: true, message: 'Please upload a file' }]}
rules={[{ required: true, message: "Please upload a file" }]}
>
<Upload accept=".json,.zip" beforeUpload={() => false} maxCount={1}>
<Button icon={<UploadOutlined />}>Click to Upload</Button>
@@ -67,7 +84,9 @@ export const ImportFlowModal: React.FC<Props> = ({ setNodes, setEdges, isImportM
<Form.Item wrapperCol={{ offset: 14, span: 8 }}>
<Space>
<Button onClick={() => setIsImportFlowModalOpen(false)}>Cancel</Button>
<Button onClick={() => setIsImportFlowModalOpen(false)}>
Cancel
</Button>
<Button type="primary" htmlType="submit">
Import
</Button>

View File

@@ -1,316 +1,325 @@
export const CommonEn = {
Knowledge_Space: 'Knowledge',
space: 'space',
Vector: 'Vector',
Owner: 'Owner',
Count: 'Count',
File_type_Invalid: 'The file type is invalid',
Knowledge_Space_Config: 'Space Config',
Choose_a_Datasource_type: 'Datasource type',
Segmentation: 'Segmentation',
Knowledge_Space: "Knowledge",
space: "space",
Vector: "Vector",
Owner: "Owner",
Count: "Count",
File_type_Invalid: "The file type is invalid",
Knowledge_Space_Config: "Space Config",
Choose_a_Datasource_type: "Datasource type",
Segmentation: "Segmentation",
No_parameter: `No segementation parameter required.`,
Knowledge_Space_Name: 'Knowledge Space Name',
Please_input_the_name: 'Please input the name',
Please_input_the_owner: 'Please input the owner',
Please_select_file: 'Please select one file',
Description: 'Description',
Storage: 'Storage',
Please_input_the_description: 'Please input the description',
Please_select_the_storage:'Please select the storage',
Please_select_the_domain_type: 'Please select the domain type',
Next: 'Next',
the_name_can_only_contain: 'the name can only contain numbers, letters, Chinese characters, "-" and "_"',
Text: 'Text',
'Fill your raw text': 'Fill your raw text',
URL: 'URL',
Fetch_the_content_of_a_URL: 'Fetch the content of a URL',
Document: 'Document',
Upload_a_document: 'Upload a document, document type can be PDF, CSV, Text, PowerPoint, Word, Markdown, Zip',
Name: 'Name',
Text_Source: 'Text Source(Optional)',
Please_input_the_text_source: 'Please input the text source',
Sync: 'Sync',
Back: 'Back',
Finish: 'Finish',
Web_Page_URL: 'Web Page URL',
Please_input_the_Web_Page_URL: 'Please input the Web Page URL',
Select_or_Drop_file: 'Select or Drop file',
Documents: 'Documents',
Chat: 'Chat',
Add_Datasource: 'Add Datasource',
View_Graph: 'View Graph',
Arguments: 'Arguments',
Type: 'Type',
Size: 'Size',
Last_Sync: 'Last Sync',
Status: 'Status',
Result: 'Result',
Details: 'Details',
Delete: 'Delete',
Operation: 'Operation',
Submit: 'Submit',
Chunks: 'Chunks',
Content: 'Content',
Meta_Data: 'Meta Data',
Please_select_a_file: 'Please select a file',
Please_input_the_text: 'Please input the text',
Embedding: 'Embedding',
topk: 'topk',
the_top_k_vectors: 'the top k vectors based on similarity score',
recall_score: 'recall_score',
Set_a_threshold_score: 'Set a threshold score for the retrieval of similar vectors',
recall_type: 'recall_type',
model: 'model',
A_model_used: 'A model used to create vector representations of text or other data',
Automatic: 'Automatic',
Process: 'Process',
Automatic_desc: 'Automatically set segmentation and preprocessing rules.',
chunk_size: 'chunk_size',
The_size_of_the_data_chunks: 'The size of the data chunks used in processing',
chunk_overlap: 'chunk_overlap',
The_amount_of_overlap: 'The amount of overlap between adjacent data chunks',
Prompt: 'Prompt',
scene: 'scene',
A_contextual_parameter: 'A contextual parameter used to define the setting or environment in which the prompt is being used',
template: 'template',
Knowledge_Space_Name: "Knowledge Space Name",
Please_input_the_name: "Please input the name",
Please_input_the_owner: "Please input the owner",
Please_select_file: "Please select one file",
Description: "Description",
Storage: "Storage",
Domain: "Domain",
Please_input_the_description: "Please input the description",
Please_select_the_storage: "Please select the storage",
Please_select_the_domain_type: "Please select the domain type",
Next: "Next",
the_name_can_only_contain:
'the name can only contain numbers, letters, Chinese characters, "-" and "_"',
Text: "Text",
"Fill your raw text": "Fill your raw text",
URL: "URL",
Fetch_the_content_of_a_URL: "Fetch the content of a URL",
Document: "Document",
Upload_a_document:
"Upload a document, document type can be PDF, CSV, Text, PowerPoint, Word, Markdown, Zip",
Name: "Name",
Text_Source: "Text Source(Optional)",
Please_input_the_text_source: "Please input the text source",
Sync: "Sync",
Back: "Back",
Finish: "Finish",
Web_Page_URL: "Web Page URL",
Please_input_the_Web_Page_URL: "Please input the Web Page URL",
Select_or_Drop_file: "Select or Drop file",
Documents: "Documents",
Chat: "Chat",
Add_Datasource: "Add Datasource",
View_Graph: "View Graph",
Arguments: "Arguments",
Type: "Type",
Size: "Size",
Last_Sync: "Last Sync",
Status: "Status",
Result: "Result",
Details: "Details",
Delete: "Delete",
Operation: "Operation",
Submit: "Submit",
Chunks: "Chunks",
Content: "Content",
Meta_Data: "Meta Data",
Please_select_a_file: "Please select a file",
Please_input_the_text: "Please input the text",
Embedding: "Embedding",
topk: "topk",
the_top_k_vectors: "the top k vectors based on similarity score",
recall_score: "recall_score",
Set_a_threshold_score:
"Set a threshold score for the retrieval of similar vectors",
recall_type: "recall_type",
model: "model",
A_model_used:
"A model used to create vector representations of text or other data",
Automatic: "Automatic",
Process: "Process",
Automatic_desc: "Automatically set segmentation and preprocessing rules.",
chunk_size: "chunk_size",
The_size_of_the_data_chunks: "The size of the data chunks used in processing",
chunk_overlap: "chunk_overlap",
The_amount_of_overlap: "The amount of overlap between adjacent data chunks",
Prompt: "Prompt",
scene: "scene",
A_contextual_parameter:
"A contextual parameter used to define the setting or environment in which the prompt is being used",
template: "template",
structure_or_format:
'A pre-defined structure or format for the prompt, which can help ensure that the AI system generates responses that are consistent with the desired style or tone.',
max_token: 'max_token',
max_iteration: 'max_iteration',
concurrency_limit: 'concurrency_limit',
The_maximum_number_of_tokens: 'The maximum number of tokens or words allowed in a prompt',
Theme: 'Theme',
Port: 'Port',
Username: 'Username',
Password: 'Password',
Remark: 'Remark',
Edit: 'Edit',
Database: 'Database',
Data_Source: 'Data Center',
Close_Sidebar: 'Fold',
Show_Sidebar: 'UnFold',
language: 'Language',
choose_model: 'Please choose a model',
data_center_desc: 'DB-GPT also offers a user-friendly data center management interface for efficient data maintenance.',
create_database: 'Create Database',
create_knowledge: 'Create Knowledge',
path: 'Path',
model_manage: 'Models',
stop_model_success: 'Stop model success',
create_model: 'Create Model',
model_select_tips: 'Please select a model',
language_select_tips: 'Please select a language',
submit: 'Submit',
close: 'Close',
start_model_success: 'Start model success',
download_model_tip: 'Please download model first.',
Plugins: 'Plugins',
try_again: 'Try again',
no_data: 'No data',
Open_Sidebar: 'Unfold',
verify: 'Verify',
cancel: 'Cancel',
Edit_Success: 'Edit Success',
Add: 'Add',
Add_Success: 'Add Success',
Error_Message: 'Something Error',
Please_Input: 'Please Input',
Prompt_Info_Scene: 'Scene',
Prompt_Info_Sub_Scene: 'Sub Scene',
Prompt_Info_Name: 'Name',
Prompt_Info_Content: 'Content',
Public: 'Public',
Private: 'Private',
Lowest: 'Lowest',
Missed: 'Missed',
Lost: 'Lost',
Incorrect: 'Incorrect',
Verbose: 'Verbose',
Best: 'Best',
Rating: 'Rating',
Q_A_Category: 'Q&A Category',
Q_A_Rating: 'Q&A Rating',
"A pre-defined structure or format for the prompt, which can help ensure that the AI system generates responses that are consistent with the desired style or tone.",
max_token: "max_token",
max_iteration: "max_iteration",
concurrency_limit: "concurrency_limit",
The_maximum_number_of_tokens:
"The maximum number of tokens or words allowed in a prompt",
Theme: "Theme",
Port: "Port",
Username: "Username",
Password: "Password",
Remark: "Remark",
Edit: "Edit",
Database: "Database",
Data_Source: "Data Center",
Close_Sidebar: "Fold",
Show_Sidebar: "UnFold",
language: "Language",
choose_model: "Please choose a model",
data_center_desc:
"DB-GPT also offers a user-friendly data center management interface for efficient data maintenance.",
create_database: "Create Database",
create_knowledge: "Create Knowledge",
path: "Path",
model_manage: "Models",
stop_model_success: "Stop model success",
create_model: "Create Model",
model_select_tips: "Please select a model",
language_select_tips: "Please select a language",
submit: "Submit",
close: "Close",
start_model_success: "Start model success",
download_model_tip: "Please download model first.",
Plugins: "Plugins",
try_again: "Try again",
no_data: "No data",
Open_Sidebar: "Unfold",
verify: "Verify",
cancel: "Cancel",
Edit_Success: "Edit Success",
Add: "Add",
Add_Success: "Add Success",
Error_Message: "Something Error",
Please_Input: "Please Input",
Prompt_Info_Scene: "Scene",
Prompt_Info_Sub_Scene: "Sub Scene",
Prompt_Info_Name: "Name",
Prompt_Info_Content: "Content",
Public: "Public",
Private: "Private",
Lowest: "Lowest",
Missed: "Missed",
Lost: "Lost",
Incorrect: "Incorrect",
Verbose: "Verbose",
Best: "Best",
Rating: "Rating",
Q_A_Category: "Q&A Category",
Q_A_Rating: "Q&A Rating",
feed_back_desc:
'0: No results\n' +
'1: Results exist, but they are irrelevant, the question is not understood\n' +
'2: Results exist, the question is understood, but it indicates that the question cannot be answered\n' +
'3: Results exist, the question is understood, and an answer is given, but the answer is incorrect\n' +
'4: Results exist, the question is understood, the answer is correct, but it is verbose and lacks a summary\n' +
'5: Results exist, the question is understood, the answer is correct, the reasoning is correct, and a summary is provided, concise and to the point\n',
input_count: 'Total input',
input_unit: 'characters',
Click_Select: 'Click&Select',
Quick_Start: 'Quick Start',
Select_Plugins: 'Select Plugins',
Search: 'Search',
Update_From_Github: 'Upload From Github',
Reset: 'Reset',
Upload: 'Upload',
Market_Plugins: 'Market Plugin',
My_Plugins: 'My Plugins',
Del_Knowledge_Tips: 'Do you want delete the Space',
Del_Document_Tips: 'Do you want delete the Document',
Tips: 'Tips',
Limit_Upload_File_Count_Tips: 'Only one file can be uploaded at a time',
To_Plugin_Market: 'Go to the Plugin Market',
Summary: 'Summary',
stacked_column_chart: 'Stacked Column',
column_chart: 'Column',
percent_stacked_column_chart: 'Percent Stacked Column',
grouped_column_chart: 'Grouped Column',
time_column: 'Time Column',
pie_chart: 'Pie',
line_chart: 'Line',
area_chart: 'Area',
stacked_area_chart: 'Stacked Area',
scatter_plot: 'Scatter',
bubble_chart: 'Bubble',
stacked_bar_chart: 'Stacked Bar',
bar_chart: 'Bar',
percent_stacked_bar_chart: 'Percent Stacked Bar',
grouped_bar_chart: 'Grouped Bar',
water_fall_chart: 'Waterfall',
table: 'Table',
multi_line_chart: 'Multi Line',
multi_measure_column_chart: 'Multi Measure Column',
multi_measure_line_chart: 'Multi Measure Line',
Advices: 'Advices',
Retry: 'Retry',
Load_more: 'load more',
new_chat: 'New Chat',
choice_agent_tip: 'Please choose an agent',
no_context_tip: 'Please enter your question',
Terminal: 'Terminal',
used_apps: 'Used Apps',
"0: No results\n" +
"1: Results exist, but they are irrelevant, the question is not understood\n" +
"2: Results exist, the question is understood, but it indicates that the question cannot be answered\n" +
"3: Results exist, the question is understood, and an answer is given, but the answer is incorrect\n" +
"4: Results exist, the question is understood, the answer is correct, but it is verbose and lacks a summary\n" +
"5: Results exist, the question is understood, the answer is correct, the reasoning is correct, and a summary is provided, concise and to the point\n",
input_count: "Total input",
input_unit: "characters",
Click_Select: "Click&Select",
Quick_Start: "Quick Start",
Select_Plugins: "Select Plugins",
Search: "Search",
Update_From_Github: "Upload From Github",
Reset: "Reset",
Upload: "Upload",
Market_Plugins: "Market Plugin",
My_Plugins: "My Plugins",
Del_Knowledge_Tips: "Do you want delete the Space",
Del_Document_Tips: "Do you want delete the Document",
Tips: "Tips",
Limit_Upload_File_Count_Tips: "Only one file can be uploaded at a time",
To_Plugin_Market: "Go to the Plugin Market",
Summary: "Summary",
stacked_column_chart: "Stacked Column",
column_chart: "Column",
percent_stacked_column_chart: "Percent Stacked Column",
grouped_column_chart: "Grouped Column",
time_column: "Time Column",
pie_chart: "Pie",
line_chart: "Line",
area_chart: "Area",
stacked_area_chart: "Stacked Area",
scatter_plot: "Scatter",
bubble_chart: "Bubble",
stacked_bar_chart: "Stacked Bar",
bar_chart: "Bar",
percent_stacked_bar_chart: "Percent Stacked Bar",
grouped_bar_chart: "Grouped Bar",
water_fall_chart: "Waterfall",
table: "Table",
multi_line_chart: "Multi Line",
multi_measure_column_chart: "Multi Measure Column",
multi_measure_line_chart: "Multi Measure Line",
Advices: "Advices",
Retry: "Retry",
Load_more: "load more",
new_chat: "New Chat",
choice_agent_tip: "Please choose an agent",
no_context_tip: "Please enter your question",
Terminal: "Terminal",
used_apps: "Used Apps",
app_in_mind: "Don't have an app in mind? to",
explore: 'Explore',
Discover_more: 'Discove more',
sdk_insert: 'SDK Insert',
my_apps: 'My Apps',
awel_flow: 'AWEL Flow',
save: 'Save',
add_node: 'Add Node',
no_node: 'No Node',
connect_warning: 'Nodes cannot be connected',
flow_modal_title: 'Save Flow',
flow_name: 'Flow Name',
flow_description: 'Flow Description',
flow_name_required: 'Please enter the flow name',
flow_description_required: 'Please enter the flow description',
save_flow_success: 'Save flow success',
delete_flow_confirm: 'Are you sure you want to delete this flow?',
related_nodes: 'Related Nodes',
add_resource: 'Add Resource',
team_modal: 'Work Modal',
App: 'App',
resource_name: 'Resource Name',
resource_type: 'Resource Type',
resource_value: 'Value',
resource_dynamic: 'Dynamic',
Please_input_the_work_modal: 'Please select the work modal',
available_resources: ' Available Resources',
edit_new_applications: 'Edit new applications',
collect: 'Collect',
collected: 'Collected',
create: 'Create',
Agents: 'Agents',
edit_application: 'edit application',
add_application: 'add application',
app_name: 'App Name',
input_app_name: 'Please enter the application name',
LLM_strategy: 'LLM Strategy',
LLM_strategy_value: 'LLM Strategy Value',
please_select_LLM_strategy: 'Please select LLM strategy',
please_select_LLM_strategy_value: 'Please select LLM strategy value',
resource: 'Resource',
operators: 'Operators',
Chinese: 'Chinese',
English: 'English',
docs: 'Docs',
apps: 'All Apps',
please_enter_the_keywords: 'Please enter the keywords',
input_tip: 'Please select the model and enter the description to start quickly',
create_app: 'Create App',
copy_url: 'Click the Copy Share link',
double_click_open: 'Double click on Nail nail to open',
construct: ' Construct App',
chat_online: 'Chat',
recommend_apps: 'Recommend',
all_apps: 'All',
latest_apps: 'Latest',
my_collected_apps: 'Collected',
collect_success: 'Collect success',
cancel_success: 'Cancel success',
published: 'Published',
unpublished: 'Unpublished',
start_chat: 'Chat',
native_app: 'Native app',
temperature: 'Temperature',
create_flow: 'Create flow',
update: 'Update',
native_type: 'App type',
refreshSuccess: 'Refresh Success',
Download: 'Download',
app_type_select: 'Please select app type',
please_select_param: 'Please select parameters',
please_select_model: 'Please select model',
please_input_temperature: 'Please input the temperature value',
select_workflow: 'Select workflow',
please_select_workflow: 'Please select workflow',
recommended_questions: 'Recommended questions',
question: 'Question',
please_input_recommended_questions: 'Please input recommendation question',
is_effective: 'Whether to enable',
add_question: 'Add question',
update_success: 'Update successful',
update_failed: 'Update failed',
please_select_prompt: 'Please select a prompt',
details: 'Details',
choose: 'Choose',
please_choose: 'Please choose',
explore: "Explore",
Discover_more: "Discove more",
sdk_insert: "SDK Insert",
my_apps: "My Apps",
awel_flow: "AWEL Flow",
save: "Save",
add_node: "Add Node",
no_node: "No Node",
connect_warning: "Nodes cannot be connected",
flow_modal_title: "Save Flow",
flow_name: "Flow Name",
flow_description: "Flow Description",
flow_name_required: "Please enter the flow name",
flow_description_required: "Please enter the flow description",
save_flow_success: "Save flow success",
delete_flow_confirm: "Are you sure you want to delete this flow?",
related_nodes: "Related Nodes",
add_resource: "Add Resource",
team_modal: "Work Modal",
App: "App",
resource_name: "Resource Name",
resource_type: "Resource Type",
resource_value: "Value",
resource_dynamic: "Dynamic",
Please_input_the_work_modal: "Please select the work modal",
available_resources: " Available Resources",
edit_new_applications: "Edit new applications",
collect: "Collect",
collected: "Collected",
create: "Create",
Agents: "Agents",
edit_application: "edit application",
add_application: "add application",
app_name: "App Name",
input_app_name: "Please enter the application name",
LLM_strategy: "LLM Strategy",
LLM_strategy_value: "LLM Strategy Value",
please_select_LLM_strategy: "Please select LLM strategy",
please_select_LLM_strategy_value: "Please select LLM strategy value",
resource: "Resource",
operators: "Operators",
Chinese: "Chinese",
English: "English",
docs: "Docs",
apps: "All Apps",
please_enter_the_keywords: "Please enter the keywords",
input_tip:
"Please select the model and enter the description to start quickly",
create_app: "Create App",
copy_url: "Click the Copy Share link",
double_click_open: "Double click on Nail nail to open",
construct: " Construct App",
chat_online: "Chat",
recommend_apps: "Recommend",
all_apps: "All",
latest_apps: "Latest",
my_collected_apps: "Collected",
collect_success: "Collect success",
cancel_success: "Cancel success",
published: "Published",
unpublished: "Unpublished",
start_chat: "Chat",
native_app: "Native app",
temperature: "Temperature",
create_flow: "Create flow",
update: "Update",
native_type: "App type",
refreshSuccess: "Refresh Success",
Download: "Download",
app_type_select: "Please select app type",
please_select_param: "Please select parameters",
please_select_model: "Please select model",
please_input_temperature: "Please input the temperature value",
select_workflow: "Select workflow",
please_select_workflow: "Please select workflow",
recommended_questions: "Recommended questions",
question: "Question",
please_input_recommended_questions: "Please input recommendation question",
is_effective: "Whether to enable",
add_question: "Add question",
update_success: "Update successful",
update_failed: "Update failed",
please_select_prompt: "Please select a prompt",
details: "Details",
choose: "Choose",
please_choose: "Please choose",
want_delete: "Are you sure delete it?",
success: 'Success',
input_parameter: 'Input parameter',
output_structure: 'Output structure',
User_input: 'User input',
LLM_test: 'LLM test',
Output_verification: 'Output verification',
select_scene: 'Please select a scene',
select_type: 'Please select a type',
Please_complete_the_input_parameters: 'Please complete the input parameters',
Please_fill_in_the_user_input: 'Please fill in the user input',
help: 'I can help you:',
Refresh_status: 'Refresh status',
Recall_test: 'Recall test',
synchronization: 'One-key synchronization',
Synchronization_initiated: 'Synchronization has been initiated, please wait',
Edit_document: 'Edit document',
Document_name: 'Document name',
Correlation_problem: 'Correlation problem',
Add_problem: 'Add problem',
New_knowledge_base: 'New knowledge base',
yuque: 'yuque document',
Get_yuque_document: 'Get the contents of the Sparrow document',
document_url: 'Document address',
input_document_url: 'Please enter the document address',
Get_token: 'Please obtain the team knowledge base token first',
Reference_link: 'Reference link',
document_token: 'Document token',
input_document_token: 'Please enter document token',
input_question: 'Please enter a question',
detail: 'Detail',
Manual_entry: 'Manual entry',
Data_content: 'Data content',
Main_content: 'Main content',
Auxiliary_data: 'Auxiliary data',
enter_question_first: 'Please enter the question first',
unpublish: 'Unpublish',
publish: 'Publish',
Update_successfully: 'Update successfully',
Create_successfully: 'Create successfully',
Update_failure: 'Update failure',
Create_failure: 'Create failure',
View_details: 'View details',
All: 'All',
Please_input_prompt_name: 'Please input prompt name',
success: "Success",
input_parameter: "Input parameter",
output_structure: "Output structure",
User_input: "User input",
LLM_test: "LLM test",
Output_verification: "Output verification",
select_scene: "Please select a scene",
select_type: "Please select a type",
Please_complete_the_input_parameters: "Please complete the input parameters",
Please_fill_in_the_user_input: "Please fill in the user input",
help: "I can help you:",
Refresh_status: "Refresh status",
Recall_test: "Recall test",
synchronization: "One-key synchronization",
Synchronization_initiated: "Synchronization has been initiated, please wait",
Edit_document: "Edit document",
Document_name: "Document name",
Correlation_problem: "Correlation problem",
Add_problem: "Add problem",
New_knowledge_base: "New knowledge base",
yuque: "yuque document",
Get_yuque_document: "Get the contents of the Sparrow document",
document_url: "Document address",
input_document_url: "Please enter the document address",
Get_token: "Please obtain the team knowledge base token first",
Reference_link: "Reference link",
document_token: "Document token",
input_document_token: "Please enter document token",
input_question: "Please enter a question",
detail: "Detail",
Manual_entry: "Manual entry",
Data_content: "Data content",
Main_content: "Main content",
Auxiliary_data: "Auxiliary data",
enter_question_first: "Please enter the question first",
unpublish: "Unpublish",
publish: "Publish",
Update_successfully: "Update successfully",
Create_successfully: "Create successfully",
Update_failure: "Update failure",
Create_failure: "Create failure",
View_details: "View details",
All: "All",
Please_input_prompt_name: "Please input prompt name",
} as const;

9
web/locales/en/flow.ts Normal file
View File

@@ -0,0 +1,9 @@
export const FlowEn = {
Upload_Data_Successfully: "file uploaded successfully",
Upload_Data_Failed: "file upload failed",
Upload_Data: "Upload Data",
Code_Editor: "Code Editor",
Open_Code_Editor: "Open Code Editor",
Export_Flow_Success: "Export flow success",
Import_Flow_Success: "Import flow success",
};

View File

@@ -1,8 +1,10 @@
import { ChatEn } from './chat';
import { CommonEn } from './common';
import { ChatEn } from "./chat";
import { CommonEn } from "./common";
import { FlowEn } from "./flow";
const en = {
...ChatEn,
...FlowEn,
...CommonEn,
};

View File

@@ -1,4 +1,4 @@
import { CommonEn } from '../en/common';
import { CommonEn } from "../en/common";
type I18nKeys = keyof typeof CommonEn;
@@ -6,318 +6,322 @@ interface Resources {
translation: Record<I18nKeys, string>;
}
export const CommonZh: Resources['translation'] = {
Knowledge_Space: '知识库',
space: '知识库',
Vector: '向量',
Owner: '创建人',
Count: '文档数',
File_type_Invalid: '文件类型错误',
Knowledge_Space_Config: '知识库配置',
Choose_a_Datasource_type: '知识库类型',
Segmentation: '分片',
No_parameter: '不需要配置分片参数',
Knowledge_Space_Name: '知识库名称',
Please_input_the_name: '请输入名称',
Please_input_the_owner: '请输入创建人',
Please_select_file: '请至少选择一个文件',
Description: '描述',
Storage: '存储类型',
Please_input_the_description: '请输入描述',
Please_select_the_storage:'请选择存储类型',
Please_select_the_domain_type: '请选择领域类型',
Next: '下一步',
the_name_can_only_contain: '名称只能包含数字、字母、中文字符、-或_',
Text: '文本',
'Fill your raw text': '填写您的原始文本',
URL: '网址',
Fetch_the_content_of_a_URL: '获取 URL 的内容',
Document: '文档',
Upload_a_document: '上传文档文档类型可以是PDF、CSV、Text、PowerPoint、Word、Markdown、Zip',
Name: '名称',
Text_Source: '文本来源(可选)',
Please_input_the_text_source: '请输入文本来源',
Sync: '同步',
Back: '上一步',
Finish: '完成',
Web_Page_URL: '网页网址',
Please_input_the_Web_Page_URL: '请输入网页网址',
Select_or_Drop_file: '选择或拖拽文件',
Documents: '文档',
Chat: '对话',
Add_Datasource: '添加数据源',
View_Graph: '查看图谱',
Arguments: '参数',
Type: '类型',
Size: '切片',
Last_Sync: '上次同步时间',
Status: '状态',
Result: '结果',
Details: '明细',
Delete: '删除',
Operation: '操作',
Submit: '提交',
close: '关闭',
Chunks: '切片',
Content: '内容',
Meta_Data: '元数据',
Please_select_a_file: '请上传一个文件',
Please_input_the_text: '请输入文本',
Embedding: '嵌入',
topk: 'TopK',
the_top_k_vectors: '基于相似度得分的前 k 个向量',
recall_score: '召回分数',
Set_a_threshold_score: '设置相似向量检索的阈值分数',
recall_type: '召回类型',
model: '模型',
A_model_used: '用于创建文本或其他数据的矢量表示的模型',
Automatic: '自动切片',
Process: '切片处理',
Automatic_desc: '自动设置分割和预处理规则。',
chunk_size: '块大小',
The_size_of_the_data_chunks: '处理中使用的数据块的大小',
chunk_overlap: '块重叠',
The_amount_of_overlap: '相邻数据块之间的重叠量',
scene: '场景',
A_contextual_parameter: '用于定义使用提示的设置或环境的上下文参数',
template: '模板',
structure_or_format: '预定义的提示结构或格式,有助于确保人工智能系统生成与所需风格或语气一致的响应。',
max_token: '最大令牌',
max_iteration: '最大迭代',
concurrency_limit: '并发限制',
The_maximum_number_of_tokens: '提示中允许的最大标记或单词数',
Theme: '主题',
Port: '端口',
Username: '用户名',
Password: '密码',
Remark: '备注',
Edit: '编辑',
Database: '数据库',
Data_Source: '数据中心',
Close_Sidebar: '收起',
Show_Sidebar: '展开',
language: '语言',
choose_model: '请选择一个模型',
data_center_desc: 'DB-GPT支持数据库交互和基于文档的对话它还提供了一个用户友好的数据中心管理界面。',
create_database: '创建数据库',
create_knowledge: '创建知识库',
create_flow: '创建工作流',
path: '路径',
model_manage: '模型管理',
stop_model_success: '模型停止成功',
create_model: '创建模型',
model_select_tips: '请选择一个模型',
submit: '提交',
start_model_success: '启动模型成功',
download_model_tip: '请先下载模型!',
Plugins: '插件列表',
try_again: '刷新重试',
no_data: '暂无数据',
Prompt: '提示词',
Open_Sidebar: '展开',
verify: '确认',
cancel: '取消',
Edit_Success: '编辑成功',
Add: '新增',
Add_Success: '新增成功',
Error_Message: '出错了',
Please_Input: '请输入',
Prompt_Info_Scene: '场景',
Prompt_Info_Sub_Scene: '次级场景',
Prompt_Info_Name: '名称',
Prompt_Info_Content: '内容',
Public: '公共',
Private: '私有',
Lowest: '渣渣',
Missed: '没理解',
Lost: '答不了',
Incorrect: '答错了',
Verbose: '较啰嗦',
Best: '真棒',
Rating: '评分',
Q_A_Category: '问答类别',
Q_A_Rating: '问答评分',
export const CommonZh: Resources["translation"] = {
Knowledge_Space: "知识库",
space: "知识库",
Vector: "向量",
Owner: "创建人",
Count: "文档数",
File_type_Invalid: "文件类型错误",
Knowledge_Space_Config: "知识库配置",
Choose_a_Datasource_type: "知识库类型",
Segmentation: "分片",
No_parameter: "不需要配置分片参数",
Knowledge_Space_Name: "知识库名称",
Please_input_the_name: "请输入名称",
Please_input_the_owner: "请输入创建人",
Please_select_file: "请至少选择一个文件",
Description: "描述",
Storage: "存储类型",
Domain: "领域类型",
Please_input_the_description: "请输入描述",
Please_select_the_storage: "请选择存储类型",
Please_select_the_domain_type: "请选择领域类型",
Next: "下一步",
the_name_can_only_contain: "名称只能包含数字、字母、中文字符、-或_",
Text: "文本",
"Fill your raw text": "填写您的原始文本",
URL: "网址",
Fetch_the_content_of_a_URL: "获取 URL 的内容",
Document: "文档",
Upload_a_document:
"上传文档文档类型可以是PDF、CSV、Text、PowerPoint、Word、Markdown、Zip",
Name: "名称",
Text_Source: "文本来源(可选)",
Please_input_the_text_source: "请输入文本来源",
Sync: "同步",
Back: "上一步",
Finish: "完成",
Web_Page_URL: "网页网址",
Please_input_the_Web_Page_URL: "请输入网页网址",
Select_or_Drop_file: "选择或拖拽文件",
Documents: "文档",
Chat: "对话",
Add_Datasource: "添加数据源",
View_Graph: "查看图谱",
Arguments: "参数",
Type: "类型",
Size: "切片",
Last_Sync: "上次同步时间",
Status: "状态",
Result: "结果",
Details: "明细",
Delete: "删除",
Operation: "操作",
Submit: "提交",
close: "关闭",
Chunks: "切片",
Content: "内容",
Meta_Data: "元数据",
Please_select_a_file: "请上传一个文件",
Please_input_the_text: "请输入文本",
Embedding: "嵌入",
topk: "TopK",
the_top_k_vectors: "基于相似度得分的前 k 个向量",
recall_score: "召回分数",
Set_a_threshold_score: "设置相似向量检索的阈值分数",
recall_type: "召回类型",
model: "模型",
A_model_used: "用于创建文本或其他数据的矢量表示的模型",
Automatic: "自动切片",
Process: "切片处理",
Automatic_desc: "自动设置分割和预处理规则。",
chunk_size: "块大小",
The_size_of_the_data_chunks: "处理中使用的数据块的大小",
chunk_overlap: "块重叠",
The_amount_of_overlap: "相邻数据块之间的重叠量",
scene: "场景",
A_contextual_parameter: "用于定义使用提示的设置或环境的上下文参数",
template: "模板",
structure_or_format:
"预定义的提示结构或格式,有助于确保人工智能系统生成与所需风格或语气一致的响应。",
max_token: "最大令牌",
max_iteration: "最大迭代",
concurrency_limit: "并发限制",
The_maximum_number_of_tokens: "提示中允许的最大标记或单词数",
Theme: "主题",
Port: "端口",
Username: "用户名",
Password: "密码",
Remark: "备注",
Edit: "编辑",
Database: "数据库",
Data_Source: "数据中心",
Close_Sidebar: "收起",
Show_Sidebar: "展开",
language: "语言",
choose_model: "请选择一个模型",
data_center_desc:
"DB-GPT支持数据库交互和基于文档的对话它还提供了一个用户友好的数据中心管理界面。",
create_database: "创建数据库",
create_knowledge: "创建知识库",
create_flow: "创建工作流",
path: "路径",
model_manage: "模型管理",
stop_model_success: "模型停止成功",
create_model: "创建模型",
model_select_tips: "请选择一个模型",
submit: "提交",
start_model_success: "启动模型成功",
download_model_tip: "请先下载模型!",
Plugins: "插件列表",
try_again: "刷新重试",
no_data: "暂无数据",
Prompt: "提示词",
Open_Sidebar: "展开",
verify: "确认",
cancel: "取消",
Edit_Success: "编辑成功",
Add: "新增",
Add_Success: "新增成功",
Error_Message: "出错了",
Please_Input: "请输入",
Prompt_Info_Scene: "场景",
Prompt_Info_Sub_Scene: "次级场景",
Prompt_Info_Name: "名称",
Prompt_Info_Content: "内容",
Public: "公共",
Private: "私有",
Lowest: "渣渣",
Missed: "没理解",
Lost: "答不了",
Incorrect: "答错了",
Verbose: "较啰嗦",
Best: "真棒",
Rating: "评分",
Q_A_Category: "问答类别",
Q_A_Rating: "问答评分",
feed_back_desc:
'0: 无结果\n' +
'1: 有结果,但是在文不对题,没有理解问题\n' +
'2: 有结果,理解了问题,但是提示回答不了这个问题\n' +
'3: 有结果,理解了问题,并做出回答,但是回答的结果错误\n' +
'4: 有结果,理解了问题,回答结果正确,但是比较啰嗦,缺乏总结\n' +
'5: 有结果,理解了问题,回答结果正确,推理正确,并给出了总结,言简意赅\n',
input_count: '共计输入',
input_unit: '字',
Click_Select: '点击选择',
Quick_Start: '快速开始',
Select_Plugins: '选择插件',
Search: '搜索',
Reset: '重置',
Update_From_Github: '更新Github插件',
Upload: '上传',
Market_Plugins: '插件市场',
My_Plugins: '我的插件',
Del_Knowledge_Tips: '你确定删除该知识库吗',
Del_Document_Tips: '你确定删除该文档吗',
Tips: '提示',
Limit_Upload_File_Count_Tips: '一次只能上传一个文件',
To_Plugin_Market: '前往插件市场',
Summary: '总结',
stacked_column_chart: '堆叠柱状图',
column_chart: '柱状图',
percent_stacked_column_chart: '百分比堆叠柱状图',
grouped_column_chart: '簇形柱状图',
time_column: '簇形柱状图',
pie_chart: '饼图',
line_chart: '折线图',
area_chart: '面积图',
stacked_area_chart: '堆叠面积图',
scatter_plot: '散点图',
bubble_chart: '气泡图',
stacked_bar_chart: '堆叠条形图',
bar_chart: '条形图',
percent_stacked_bar_chart: '百分比堆叠条形图',
grouped_bar_chart: '簇形条形图',
water_fall_chart: '瀑布图',
table: '表格',
multi_line_chart: '多折线图',
multi_measure_column_chart: '多指标柱形图',
multi_measure_line_chart: '多指标折线图',
Advices: '自动推荐',
Retry: '重试',
Load_more: '加载更多',
new_chat: '创建会话',
choice_agent_tip: '请选择代理',
no_context_tip: '请输入你的问题',
Terminal: '终端',
used_apps: '最近使用',
app_in_mind: '没有心仪的应用?去',
explore: '探索广场',
Discover_more: '发现更多',
sdk_insert: 'SDK接入',
my_apps: '我的应用',
awel_flow: 'AWEL 工作流',
save: '保存',
add_node: '添加节点',
no_node: '没有可编排节点',
connect_warning: '节点无法连接',
flow_modal_title: '保存工作流',
flow_name: '工作流名称',
flow_description: '工作流描述',
flow_name_required: '请输入工作流名称',
flow_description_required: '请输入工作流描述',
save_flow_success: '保存工作流成功',
delete_flow_confirm: '确定删除该工作流吗?',
related_nodes: '关联节点',
language_select_tips: '请选择语言',
add_resource: '添加资源',
team_modal: '工作模式',
App: '应用程序',
resource: '资源',
resource_name: '资源名',
resource_type: '资源类型',
resource_value: '参数',
resource_dynamic: '动态',
Please_input_the_work_modal: '请选择工作模式',
available_resources: '可用资源',
edit_new_applications: '编辑新的应用',
collect: '收藏',
collected: '已收藏',
create: '创建',
Agents: '智能体',
edit_application: '编辑应用',
add_application: '添加应用',
app_name: '应用名称',
input_app_name: '请输入应用名称',
LLM_strategy: '模型策略',
please_select_LLM_strategy: '请选择模型策略',
LLM_strategy_value: '模型策略参数',
please_select_LLM_strategy_value: '请选择模型策略参数',
operators: '算子',
Chinese: '中文',
English: '英文',
docs: '文档',
apps: '全部',
please_enter_the_keywords: '请输入关键词',
input_tip: '请选择模型,输入描述快速开始',
create_app: '创建应用',
copy_url: '单击复制分享链接',
double_click_open: '双击钉钉打开',
construct: '应用管理',
chat_online: '在线对话',
recommend_apps: '热门推荐',
all_apps: '全部应用',
latest_apps: '最新应用',
my_collected_apps: '我的收藏',
collect_success: '收藏成功',
cancel_success: '取消成功',
published: '已发布',
unpublished: '未发布',
start_chat: '开始对话',
native_app: '原生应用',
native_type: '应用类型',
temperature: '温度',
update: '更新',
refreshSuccess: '刷新成功',
Download: '下载',
app_type_select: '请选择应用类型',
please_select_param: '请选择参数',
please_select_model: '请选择模型',
please_input_temperature: '请输入temperature值',
select_workflow: '选择工作流',
please_select_workflow: '请选择工作流',
recommended_questions: '推荐问题',
question: '问题',
please_input_recommended_questions: '请输入推荐问题',
is_effective: '是否生效',
add_question: '添加问题',
update_success: '更新成功',
update_failed: '更新失败',
please_select_prompt: '请选择一个提示词',
details: '详情',
choose: '选择',
please_choose: '请先选择',
"0: 无结果\n" +
"1: 有结果,但是在文不对题,没有理解问题\n" +
"2: 有结果,理解了问题,但是提示回答不了这个问题\n" +
"3: 有结果,理解了问题,并做出回答,但是回答的结果错误\n" +
"4: 有结果,理解了问题,回答结果正确,但是比较啰嗦,缺乏总结\n" +
"5: 有结果,理解了问题,回答结果正确,推理正确,并给出了总结,言简意赅\n",
input_count: "共计输入",
input_unit: "字",
Click_Select: "点击选择",
Quick_Start: "快速开始",
Select_Plugins: "选择插件",
Search: "搜索",
Reset: "重置",
Update_From_Github: "更新Github插件",
Upload: "上传",
Market_Plugins: "插件市场",
My_Plugins: "我的插件",
Del_Knowledge_Tips: "你确定删除该知识库吗",
Del_Document_Tips: "你确定删除该文档吗",
Tips: "提示",
Limit_Upload_File_Count_Tips: "一次只能上传一个文件",
To_Plugin_Market: "前往插件市场",
Summary: "总结",
stacked_column_chart: "堆叠柱状图",
column_chart: "柱状图",
percent_stacked_column_chart: "百分比堆叠柱状图",
grouped_column_chart: "簇形柱状图",
time_column: "簇形柱状图",
pie_chart: "饼图",
line_chart: "折线图",
area_chart: "面积图",
stacked_area_chart: "堆叠面积图",
scatter_plot: "散点图",
bubble_chart: "气泡图",
stacked_bar_chart: "堆叠条形图",
bar_chart: "条形图",
percent_stacked_bar_chart: "百分比堆叠条形图",
grouped_bar_chart: "簇形条形图",
water_fall_chart: "瀑布图",
table: "表格",
multi_line_chart: "多折线图",
multi_measure_column_chart: "多指标柱形图",
multi_measure_line_chart: "多指标折线图",
Advices: "自动推荐",
Retry: "重试",
Load_more: "加载更多",
new_chat: "创建会话",
choice_agent_tip: "请选择代理",
no_context_tip: "请输入你的问题",
Terminal: "终端",
used_apps: "最近使用",
app_in_mind: "没有心仪的应用?去",
explore: "探索广场",
Discover_more: "发现更多",
sdk_insert: "SDK接入",
my_apps: "我的应用",
awel_flow: "AWEL 工作流",
save: "保存",
add_node: "添加节点",
no_node: "没有可编排节点",
connect_warning: "节点无法连接",
flow_modal_title: "保存工作流",
flow_name: "工作流名称",
flow_description: "工作流描述",
flow_name_required: "请输入工作流名称",
flow_description_required: "请输入工作流描述",
save_flow_success: "保存工作流成功",
delete_flow_confirm: "确定删除该工作流吗?",
related_nodes: "关联节点",
language_select_tips: "请选择语言",
add_resource: "添加资源",
team_modal: "工作模式",
App: "应用程序",
resource: "资源",
resource_name: "资源名",
resource_type: "资源类型",
resource_value: "参数",
resource_dynamic: "动态",
Please_input_the_work_modal: "请选择工作模式",
available_resources: "可用资源",
edit_new_applications: "编辑新的应用",
collect: "收藏",
collected: "已收藏",
create: "创建",
Agents: "智能体",
edit_application: "编辑应用",
add_application: "添加应用",
app_name: "应用名称",
input_app_name: "请输入应用名称",
LLM_strategy: "模型策略",
please_select_LLM_strategy: "请选择模型策略",
LLM_strategy_value: "模型策略参数",
please_select_LLM_strategy_value: "请选择模型策略参数",
operators: "算子",
Chinese: "中文",
English: "英文",
docs: "文档",
apps: "全部",
please_enter_the_keywords: "请输入关键词",
input_tip: "请选择模型,输入描述快速开始",
create_app: "创建应用",
copy_url: "单击复制分享链接",
double_click_open: "双击钉钉打开",
construct: "应用管理",
chat_online: "在线对话",
recommend_apps: "热门推荐",
all_apps: "全部应用",
latest_apps: "最新应用",
my_collected_apps: "我的收藏",
collect_success: "收藏成功",
cancel_success: "取消成功",
published: "已发布",
unpublished: "未发布",
start_chat: "开始对话",
native_app: "原生应用",
native_type: "应用类型",
temperature: "温度",
update: "更新",
refreshSuccess: "刷新成功",
Download: "下载",
app_type_select: "请选择应用类型",
please_select_param: "请选择参数",
please_select_model: "请选择模型",
please_input_temperature: "请输入temperature值",
select_workflow: "选择工作流",
please_select_workflow: "请选择工作流",
recommended_questions: "推荐问题",
question: "问题",
please_input_recommended_questions: "请输入推荐问题",
is_effective: "是否生效",
add_question: "添加问题",
update_success: "更新成功",
update_failed: "更新失败",
please_select_prompt: "请选择一个提示词",
details: "详情",
choose: "选择",
please_choose: "请先选择",
want_delete: "你确定要删除吗?",
success: '成功',
input_parameter: '输入参数',
output_structure: '输出结构',
User_input: '用户输入',
LLM_test: 'LLM测试',
Output_verification: '输出验证',
select_scene: '请选择场景',
select_type: '请选择类型',
Please_complete_the_input_parameters: '请填写完整的输入参数',
Please_fill_in_the_user_input: '请填写用户输入内容',
help: '我可以帮您:',
Refresh_status: '刷新状态',
Recall_test: '召回测试',
synchronization: '一键同步',
Synchronization_initiated: '同步已发起,请稍后',
Edit_document: '编辑文档',
Document_name: '文档名',
Correlation_problem: '关联问题',
Add_problem: '添加问题',
New_knowledge_base: '新增知识库',
yuque: '语雀文档',
Get_yuque_document: '获取语雀文档的内容',
document_url: '文档地址',
input_document_url: '请输入文档地址',
Get_token: '请先获取团队知识库tokentoken获取',
Reference_link: '参考链接',
document_token: '文档token',
input_document_token: '请输入文档token',
input_question: '请输入问题',
detail: '详情',
Manual_entry: '手动录入',
Data_content: '数据内容',
Main_content: '主要内容',
Auxiliary_data: '辅助数据',
enter_question_first: '请先输入问题',
unpublish: '取消发布',
publish: '发布应用',
Update_successfully: '更新成功',
Create_successfully: '创建成功',
Update_failure: '更新失败',
Create_failure: '创建失败',
View_details: '查看详情',
All: '全部',
Please_input_prompt_name: '请输入prompt名称',
success: "成功",
input_parameter: "输入参数",
output_structure: "输出结构",
User_input: "用户输入",
LLM_test: "LLM测试",
Output_verification: "输出验证",
select_scene: "请选择场景",
select_type: "请选择类型",
Please_complete_the_input_parameters: "请填写完整的输入参数",
Please_fill_in_the_user_input: "请填写用户输入内容",
help: "我可以帮您:",
Refresh_status: "刷新状态",
Recall_test: "召回测试",
synchronization: "一键同步",
Synchronization_initiated: "同步已发起,请稍后",
Edit_document: "编辑文档",
Document_name: "文档名",
Correlation_problem: "关联问题",
Add_problem: "添加问题",
New_knowledge_base: "新增知识库",
yuque: "语雀文档",
Get_yuque_document: "获取语雀文档的内容",
document_url: "文档地址",
input_document_url: "请输入文档地址",
Get_token: "请先获取团队知识库tokentoken获取",
Reference_link: "参考链接",
document_token: "文档token",
input_document_token: "请输入文档token",
input_question: "请输入问题",
detail: "详情",
Manual_entry: "手动录入",
Data_content: "数据内容",
Main_content: "主要内容",
Auxiliary_data: "辅助数据",
enter_question_first: "请先输入问题",
unpublish: "取消发布",
publish: "发布应用",
Update_successfully: "更新成功",
Create_successfully: "创建成功",
Update_failure: "更新失败",
Create_failure: "创建失败",
View_details: "查看详情",
All: "全部",
Please_input_prompt_name: "请输入prompt名称",
} as const;

9
web/locales/zh/flow.ts Normal file
View File

@@ -0,0 +1,9 @@
export const FlowZn = {
Upload_Data_Successfully: "文件上传成功",
Upload_Data_Failed: "文件上传失败",
Upload_Data: "上传数据",
Code_Editor: "代码编辑器",
Open_Code_Editor: "打开代码编辑器",
Export_Flow_Success: "导出工作流成功",
Import_Flow_Success: "导入工作流成功",
};

View File

@@ -1,9 +1,11 @@
import { CommonZh } from './common';
import { ChatZh } from './chat';
import { CommonZh } from "./common";
import { ChatZh } from "./chat";
import { FlowZn } from "./flow";
const zh = {
...CommonZh,
...ChatZh,
...FlowZn,
...CommonZh,
};
export default zh;

File diff suppressed because it is too large Load Diff