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, PostAgentMyPluginResponse,
PostAgentPluginResponse, PostAgentPluginResponse,
PostAgentQueryParams, PostAgentQueryParams,
} from '@/types/agent'; } from "@/types/agent";
import { GetAppInfoParams, IApp, IAgent, IAppData } from '@/types/app'; import { GetAppInfoParams, IApp, IAgent, IAppData } from "@/types/app";
import { import {
ChatHistoryResponse, ChatHistoryResponse,
DialogueListResponse, DialogueListResponse,
@@ -16,8 +16,14 @@ import {
SceneResponse, SceneResponse,
UserParam, UserParam,
UserParamResponse, UserParamResponse,
} from '@/types/chat'; } from "@/types/chat";
import { ChatFeedBackSchema, DbListResponse, DbSupportTypeResponse, PostDbParams, PostDbRefreshParams } from '@/types/db'; import {
ChatFeedBackSchema,
DbListResponse,
DbSupportTypeResponse,
PostDbParams,
PostDbRefreshParams,
} from "@/types/db";
import { import {
GetEditorSQLRoundRequest, GetEditorSQLRoundRequest,
GetEditorySqlParams, GetEditorySqlParams,
@@ -25,8 +31,7 @@ import {
PostEditorChartRunResponse, PostEditorChartRunResponse,
PostEditorSQLRunParams, PostEditorSQLRunParams,
PostSQLEditorSubmitParams, PostSQLEditorSubmitParams,
} from '@/types/editor'; } from "@/types/editor";
import { IFlow, IFlowNode, IFlowUpdateParam, IFlowResponse } from '@/types/flow';
import { import {
AddKnowledgeParams, AddKnowledgeParams,
ArgumentsParams, ArgumentsParams,
@@ -41,11 +46,16 @@ import {
ISyncBatchParameter, ISyncBatchParameter,
ISyncBatchResponse, ISyncBatchResponse,
SpaceConfig, SpaceConfig,
} from '@/types/knowledge'; } from "@/types/knowledge";
import { BaseModelParams, IModelData, StartModelParams, SupportModel } from '@/types/model'; import {
import { AxiosRequestConfig } from 'axios'; BaseModelParams,
import { DELETE, GET, POST, PUT } from '.'; IModelData,
import { UpdatePromptParams, IPrompt, PromptParams } from '@/types/prompt'; StartModelParams,
SupportModel,
} from "@/types/model";
import { AxiosRequestConfig } from "axios";
import { DELETE, GET, POST, PUT } from ".";
import { UpdatePromptParams, IPrompt, PromptParams } from "@/types/prompt";
import { import {
IFlow, IFlow,
IFlowNode, IFlowNode,
@@ -56,59 +66,67 @@ import {
IFlowImportParams, IFlowImportParams,
IUploadFileRequestParams, IUploadFileRequestParams,
IUploadFileResponse, IUploadFileResponse,
} from '@/types/flow'; } from "@/types/flow";
import { IAgent, IApp, IAppData } from '@/types/app';
/** App */ /** App */
export const postScenes = () => { 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) => { 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) => { 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 */ /** Database Page */
export const getDbList = () => { export const getDbList = () => {
return GET<null, DbListResponse>('/api/v1/chat/db/list'); return GET<null, DbListResponse>("/api/v1/chat/db/list");
}; };
export const getDbSupportType = () => { 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) => { export const postDbDelete = (dbName: string) => {
return POST(`/api/v1/chat/db/delete?db_name=${dbName}`); return POST(`/api/v1/chat/db/delete?db_name=${dbName}`);
}; };
export const postDbEdit = (data: PostDbParams) => { 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) => { 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) => { 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) => { 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 */ /** Chat Page */
export const getDialogueList = () => { export const getDialogueList = () => {
return GET<null, DialogueListResponse>('/api/v1/chat/dialogue/list'); return GET<null, DialogueListResponse>("/api/v1/chat/dialogue/list");
}; };
export const getUsableModels = () => { 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) => { 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) => { 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) => { 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 = ({ export const postChatModeParamsFileLoad = ({
convUid, convUid,
@@ -125,22 +143,24 @@ export const postChatModeParamsFileLoad = ({
model: string; model: string;
userName?: string; userName?: string;
sysCode?: string; sysCode?: string;
config?: Omit<AxiosRequestConfig, 'headers'>; config?: Omit<AxiosRequestConfig, "headers">;
}) => { }) => {
return POST<FormData, any>( return POST<FormData, any>(
`/api/v1/resource/file/upload?conv_uid=${convUid}&chat_mode=${chatMode}&model_name=${model}&user_name=${userName}&sys_code=${sysCode}`, `/api/v1/resource/file/upload?conv_uid=${convUid}&chat_mode=${chatMode}&model_name=${model}&user_name=${userName}&sys_code=${sysCode}`,
data, data,
{ {
headers: { headers: {
'Content-Type': 'multipart/form-data', "Content-Type": "multipart/form-data",
}, },
...config, ...config,
}, }
); );
}; };
export const clearChatHistory = (conUid: string) => { 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 */ /** Menu */
@@ -150,19 +170,27 @@ export const delDialogue = (conv_uid: string) => {
/** Editor */ /** Editor */
export const getEditorSqlRounds = (id: string) => { 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) => { export const postEditorSqlRun = (data: PostEditorSQLRunParams) => {
return POST<PostEditorSQLRunParams>(`/api/v1/editor/sql/run`, data); return POST<PostEditorSQLRunParams>(`/api/v1/editor/sql/run`, data);
}; };
export const postEditorChartRun = (data: PostEditorChartRunParams) => { 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) => { export const postSqlEditorSubmit = (data: PostSQLEditorSubmitParams) => {
return POST<PostSQLEditorSubmitParams>(`/api/v1/sql/editor/submit`, data); return POST<PostSQLEditorSubmitParams>(`/api/v1/sql/editor/submit`, data);
}; };
export const getEditorSql = (id: string, round: string | number) => { 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 */ /** knowledge */
@@ -170,21 +198,36 @@ export const getArguments = (knowledgeName: string) => {
return POST<any, IArguments>(`/knowledge/${knowledgeName}/arguments`, {}); return POST<any, IArguments>(`/knowledge/${knowledgeName}/arguments`, {});
}; };
export const saveArguments = (knowledgeName: string, data: ArgumentsParams) => { 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) => { 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>>) => { export const getDocumentList = (
return POST<Record<string, number | Array<number>>, IDocumentResponse>(`/knowledge/${spaceName}/document/list`, data); 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 }) => { 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) => { 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) => { export const addSpace = (data: AddKnowledgeParams) => {
@@ -192,27 +235,53 @@ export const addSpace = (data: AddKnowledgeParams) => {
}; };
export const getChunkStrategies = () => { 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>>) => { export const syncDocument = (
return POST<Record<string, Array<number>>, string | null>(`/knowledge/${spaceName}/document/sync`, data); 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>) => { export const syncBatchDocument = (
return POST<Array<ISyncBatchParameter>, ISyncBatchResponse>(`/knowledge/${spaceName}/document/sync_batch`, data); spaceName: string,
data: Array<ISyncBatchParameter>
) => {
return POST<Array<ISyncBatchParameter>, ISyncBatchResponse>(
`/knowledge/${spaceName}/document/sync_batch`,
data
);
}; };
export const uploadDocument = (knowLedgeName: string, data: FormData) => { 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) => { 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>) => { export const delDocument = (
return POST<Record<string, number>, null>(`/knowledge/${spaceName}/document/delete`, data); spaceName: string,
data: Record<string, number>
) => {
return POST<Record<string, number>, null>(
`/knowledge/${spaceName}/document/delete`,
data
);
}; };
export const delSpace = (data: Record<string, string>) => { export const delSpace = (data: Record<string, string>) => {
@@ -221,48 +290,68 @@ export const delSpace = (data: Record<string, string>) => {
/** models */ /** models */
export const getModelList = () => { 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) => { 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) => { 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 = () => { export const getSupportModels = () => {
return GET<null, Array<SupportModel>>('/api/v1/worker/model/params'); return GET<null, Array<SupportModel>>("/api/v1/worker/model/params");
}; };
/** Agent */ /** Agent */
export const postAgentQuery = (data: PostAgentQueryParams) => { 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) => { 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) => { 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) => { 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) => { 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'>) => { export const postAgentUpload = (
return POST<FormData>('/api/v1/personal/agent/upload', data, { user = "",
data: FormData,
config?: Omit<AxiosRequestConfig, "headers">
) => {
return POST<FormData>("/api/v1/personal/agent/upload", data, {
params: { user }, params: { user },
headers: { headers: {
'Content-Type': 'multipart/form-data', "Content-Type": "multipart/form-data",
}, },
...config, ...config,
}); });
}; };
export const getDbgptsList = () => { export const getDbgptsList = () => {
return GET<undefined, GetDBGPTsListResponse>('/api/v1/dbgpts/list'); return GET<undefined, GetDBGPTsListResponse>("/api/v1/dbgpts/list");
}; };
/** chat feedback **/ /** chat feedback **/
@@ -270,12 +359,21 @@ export const getChatFeedBackSelect = () => {
return GET<null, FeedBack>(`/api/v1/feedback/select`, undefined); return GET<null, FeedBack>(`/api/v1/feedback/select`, undefined);
}; };
export const getChatFeedBackItme = (conv_uid: string, conv_index: number) => { 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, { return POST<ChatFeedBackSchema, any>(`/api/v1/feedback/commit`, data, {
headers: { headers: {
'Content-Type': 'application/json', "Content-Type": "application/json",
}, },
...config, ...config,
}); });
@@ -285,11 +383,11 @@ export const postChatFeedBackForm = ({ data, config }: { data: ChatFeedBackSchem
/** AWEL Flow */ /** AWEL Flow */
export const addFlow = (data: IFlowUpdateParam) => { 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) => { 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,
page_size, page_size,
}); });
@@ -312,23 +410,32 @@ export const getFlowNodes = () => {
}; };
export const refreshFlowNodeById = (data: IFlowRefreshParams) => { 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) => { 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) => { 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) => { 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) => { 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) => { export const downloadFile = (fileId: string) => {
@@ -337,7 +444,7 @@ export const downloadFile = (fileId: string) => {
// TODOwait for interface update // TODOwait for interface update
export const getFlowTemplateList = () => { 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) => { export const getFlowTemplateById = (id: string) => {
@@ -347,48 +454,52 @@ export const getFlowTemplateById = (id: string) => {
/** app */ /** app */
export const collectApp = (data: Record<string, string>) => { 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>) => { 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 = () => { 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) => { 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) => { 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>) => { 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) => { 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 = '') => { export const getSupportDBList = (db_name = "") => {
return GET<null, Record<string, any>>(`/api/v1/permission/db/list?db_name=${db_name}`); return GET<null, Record<string, any>>(
`/api/v1/permission/db/list?db_name=${db_name}`
);
}; };
export const recommendApps = (data: Record<string, string>) => { 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>) => { 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>) => { 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) => { 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>) => { export const updateKnowledgeAdmins = (data: Record<string, string>) => {
return POST<Record<string, any>, any[]>(`/knowledge/users/update`, data); return POST<Record<string, any>, any[]>(`/knowledge/users/update`, data);
@@ -398,7 +509,7 @@ export const updateKnowledgeAdmins = (data: Record<string, string>) => {
/** app */ /** app */
export const delApp = (data: Record<string, string>) => { 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 = () => { export const getSpaceConfig = () => {

View File

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

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff