Files
DocsGPT/frontend/src/locale/zh.json
Siddhant Rai 5b6cfa6ecc feat: enhance API tool with body serialization and content type handling (#2192)
* feat: enhance API tool with body serialization and content type handling

* feat: enhance ToolConfig with import functionality and user action management

- Added ImportSpecModal to allow importing actions into the tool configuration.
- Implemented search functionality for user actions with expandable action details.
- Introduced method colors for better visual distinction of HTTP methods.
- Updated APIActionType and ParameterGroupType to include optional 'required' field.
- Refactored action rendering to improve usability and maintainability.

* feat: add base URL input to ImportSpecModal for action URL customization

* feat: update TestBaseAgentTools to include 'required' field for parameters

* feat: standardize API call timeout to DEFAULT_TIMEOUT constant

* feat: add import specification functionality and related translations for multiple languages

---------

Co-authored-by: Alex <a@tushynski.me>
2025-12-23 15:37:44 +02:00

677 lines
23 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"language": "普通话",
"chat": "聊天",
"chats": "聊天",
"newChat": "新聊天",
"inputPlaceholder": "DocsGPT 如何帮助您?",
"tagline": "DocsGPT 使用 GenAI, 请使用来源审核关键信息.",
"sourceDocs": "源",
"none": "无",
"cancel": "取消",
"help": "帮助",
"emailUs": "给我们发邮件",
"documentation": "文档",
"manageAgents": "管理代理",
"demo": [
{
"header": "了解 DocsGPT",
"query": "DocsGPT 是什么"
},
{
"header": "总结文档",
"query": "总结当前情况"
},
{
"header": "编写代码",
"query": "为 /api/answer API 请求编写代码"
},
{
"header": "学习帮助",
"query": "为背景写出潜在问题"
}
],
"settings": {
"label": "设置",
"general": {
"label": "一般",
"selectTheme": "选择主题",
"light": "浅色",
"dark": "暗色",
"selectLanguage": "选择语言",
"chunks": "每个查询处理的块",
"prompt": "提示",
"deleteAllLabel": "删除所有对话",
"deleteAllBtn": "删除所有",
"addNew": "添加新的",
"convHistory": "对话历史",
"none": "无",
"low": "低",
"medium": "中",
"high": "高",
"unlimited": "无限",
"default": "默认",
"add": "添加"
},
"sources": {
"title": "在这里您可以管理所有可用的源文件以及您上传的文件。",
"label": "来源",
"name": "来源名称",
"date": "向量日期",
"type": "类型",
"tokenUsage": "令牌使用",
"noData": "没有现有的来源",
"searchPlaceholder": "搜索...",
"addNew": "添加新文档",
"addSource": "添加来源",
"addChunk": "添加块",
"preLoaded": "预加载",
"private": "私有",
"sync": "同步",
"syncing": "同步中...",
"syncConfirmation": "您确定要同步 \"{{sourceName}}\" 吗?这将使用您的云存储更新内容,并可能覆盖您对单个文本块所做的任何编辑。",
"syncFrequency": {
"never": "从不",
"daily": "每天",
"weekly": "每周",
"monthly": "每月"
},
"actions": "操作",
"view": "查看",
"deleteWarning": "您确定要删除 \"{{name}}\" 吗?",
"confirmDelete": "您确定要删除此文件吗?此操作无法撤销。",
"backToAll": "返回所有来源",
"chunks": "文本块",
"noChunks": "未找到文本块",
"noChunksAlt": "未找到文本块",
"goToSources": "前往来源",
"uploadNew": "上传新文档",
"searchFiles": "搜索文件...",
"noResults": "未找到结果",
"fileName": "名称",
"tokens": "令牌",
"size": "大小",
"fileAlt": "文件",
"folderAlt": "文件夹",
"parentFolderAlt": "父文件夹",
"menuAlt": "菜单",
"tokensUnit": "令牌",
"editAlt": "编辑",
"uploading": "正在上传…",
"deleting": "正在删除…",
"queued": "已排队:{{count}}",
"addFile": "添加文件",
"uploadingFilesTitle": "正在上传文件...",
"deletingTitle": "正在删除...",
"deleteDirectoryWarning": "确定要删除目录 \"{{name}}\" 及其所有内容吗?此操作无法撤销。",
"searchAlt": "搜索"
},
"apiKeys": {
"label": "聊天机器人",
"name": "名称",
"key": "API 密钥",
"sourceDoc": "源文档",
"createNew": "创建新的",
"noData": "没有现有的聊天机器人",
"deleteConfirmation": "您确定要删除 API 密钥 '{{name}}' 吗?",
"description": "在这里,您可以创建和管理您的聊天机器人。聊天机器人可以作为小部件部署到网站上,或在您的应用程序中使用。"
},
"analytics": {
"label": "分析",
"filterByChatbot": "按聊天机器人筛选",
"selectChatbot": "选择聊天机器人",
"filterOptions": {
"hour": "小时",
"last24Hours": "24 小时",
"last7Days": "7 天",
"last15Days": "15 天",
"last30Days": "30 天"
},
"messages": "消息",
"tokenUsage": "令牌使用",
"userFeedback": "用户反馈",
"filterPlaceholder": "筛选",
"none": "无",
"positiveFeedback": "正向反馈",
"negativeFeedback": "负向反馈"
},
"logs": {
"label": "日志",
"filterByChatbot": "按聊天机器人筛选",
"selectChatbot": "选择聊天机器人",
"none": "无",
"tableHeader": "API 生成 / 聊天机器人会话"
},
"tools": {
"label": "工具",
"searchPlaceholder": "搜索工具...",
"addTool": "添加工具",
"noToolsFound": "未找到工具",
"selectToolSetup": "选择要设置的工具",
"settingsIconAlt": "设置图标",
"configureToolAria": "配置 {{toolName}}",
"toggleToolAria": "切换 {{toolName}}",
"manageTools": "前往工具",
"edit": "编辑",
"delete": "删除",
"deleteWarning": "您确定要删除工具 \"{{toolName}}\" 吗?",
"unsavedChanges": "您有未保存的更改,如果不保存就离开将会丢失。",
"leaveWithoutSaving": "不保存离开",
"saveAndLeave": "保存并离开",
"customName": "自定义名称",
"customNamePlaceholder": "输入自定义名称(可选)",
"authentication": "认证",
"actions": "操作",
"addAction": "添加操作",
"importSpec": "导入规范",
"searchActions": "搜索操作...",
"noActionsMatch": "没有与搜索匹配的操作",
"actionAlreadyExists": "已存在同名操作",
"noActionsFound": "未找到操作",
"url": "URL",
"urlPlaceholder": "输入url",
"method": "方法",
"description": "描述",
"descriptionPlaceholder": "输入描述",
"bodyContentType": "请求体内容类型",
"headers": "请求头",
"queryParameters": "查询参数",
"body": "请求体",
"deleteActionWarning": "您确定要删除操作 \"{{name}}\" 吗?",
"backToAllTools": "返回所有工具",
"save": "保存",
"fieldName": "字段名称",
"fieldType": "字段类型",
"filledByLLM": "由LLM填充",
"fieldDescription": "字段描述",
"value": "值",
"addProperty": "添加属性",
"propertyName": "新属性键",
"add": "添加",
"cancel": "取消",
"addNew": "添加新的",
"name": "名称",
"type": "类型",
"mcp": {
"addServer": "Add MCP Server",
"editServer": "Edit Server",
"serverName": "Server Name",
"serverUrl": "Server URL",
"headerName": "Header Name",
"timeout": "Timeout (seconds)",
"testConnection": "Test Connection",
"testing": "Testing",
"saving": "Saving",
"save": "Save",
"cancel": "Cancel",
"noAuth": "No Authentication",
"oauthInProgress": "Waiting for OAuth completion...",
"oauthCompleted": "OAuth completed successfully",
"authType": "Authentication Type",
"defaultServerName": "My MCP Server",
"authTypes": {
"none": "No Authentication",
"apiKey": "API Key",
"bearer": "Bearer Token",
"oauth": "OAuth",
"basic": "Basic Authentication"
},
"placeholders": {
"serverUrl": "https://api.example.com",
"apiKey": "Your secret API key",
"bearerToken": "Your secret token",
"username": "Your username",
"password": "Your password",
"oauthScopes": "OAuth scopes (comma separated)"
},
"errors": {
"nameRequired": "Server name is required",
"urlRequired": "Server URL is required",
"invalidUrl": "Please enter a valid URL",
"apiKeyRequired": "API key is required",
"tokenRequired": "Bearer token is required",
"usernameRequired": "Username is required",
"passwordRequired": "Password is required",
"testFailed": "Connection test failed",
"saveFailed": "Failed to save MCP server",
"oauthFailed": "OAuth process failed or was cancelled",
"oauthTimeout": "OAuth process timed out, please try again",
"timeoutRange": "Timeout must be between 1 and 300 seconds"
}
}
},
"scrollTabsLeft": "向左滚动标签",
"tabsAriaLabel": "设置标签",
"scrollTabsRight": "向右滚动标签"
},
"modals": {
"uploadDoc": {
"label": "上传新文档",
"select": "选择如何将文档上传到 DocsGPT",
"selectSource": "选择添加源的方式",
"selectedFiles": "已选择的文件",
"noFilesSelected": "未选择文件",
"file": "从设备上传",
"back": "后退",
"wait": "请稍等 ...",
"remote": "从网站收集",
"start": "开始聊天",
"name": "名称",
"choose": "选择文件",
"info": "请上传限制为25MB的.pdf、.txt、.rst、.csv、.xlsx、.docx、.md、.html、.epub、.json、.pptx、.zip文件",
"uploadedFiles": "已上传文件",
"cancel": "取消",
"train": "训练",
"link": "链接",
"urlLink": "URL 链接",
"repoUrl": "存储库 URL",
"reddit": {
"id": "客户端ID",
"secret": "客户端密钥",
"agent": "用户代理",
"searchQueries": "搜索查询",
"numberOfPosts": "帖子数量",
"addQuery": "添加查询"
},
"drag": {
"title": "将附件拖放到此处",
"description": "释放以上传您的附件"
},
"progress": {
"upload": "正在上传",
"training": "正在上传",
"completed": "上传完成",
"failed": "上传失败",
"wait": "这可能需要几分钟",
"preparing": "准备上传",
"tokenLimit": "超出令牌限制,请考虑上传较小的文档",
"expandDetails": "展开上传详情",
"collapseDetails": "折叠上传详情",
"dismiss": "关闭上传通知",
"uploadProgress": "上传进度 {{progress}}%",
"clear": "清除"
},
"showAdvanced": "显示高级选项",
"hideAdvanced": "隐藏高级选项",
"ingestors": {
"local_file": {
"label": "上传文件",
"heading": "上传新文档"
},
"crawler": {
"label": "爬虫",
"heading": "使用网络爬虫添加内容"
},
"url": {
"label": "链接",
"heading": "从URL添加内容"
},
"github": {
"label": "GitHub",
"heading": "从GitHub添加内容"
},
"reddit": {
"label": "Reddit",
"heading": "从Reddit添加内容"
},
"google_drive": {
"label": "Google Drive",
"heading": "从Google Drive上传"
}
},
"connectors": {
"auth": {
"connectedUser": "已连接用户",
"authFailed": "身份验证失败",
"authUrlFailed": "获取授权URL失败",
"popupBlocked": "无法打开身份验证窗口。请允许弹出窗口。",
"authCancelled": "身份验证已取消",
"connectedAs": "已连接为 {{email}}",
"disconnect": "断开连接"
},
"googleDrive": {
"connect": "连接到 Google Drive",
"sessionExpired": "会话已过期。请重新连接到 Google Drive。",
"sessionExpiredGeneric": "会话已过期。请重新连接您的账户。",
"validateFailed": "验证会话失败。请重新连接。",
"noSession": "未找到有效会话。请重新连接到 Google Drive。",
"noAccessToken": "访问令牌不可用。请重新连接到 Google Drive。",
"pickerFailed": "无法打开文件选择器。请重试。",
"selectedFiles": "已选择的文件",
"selectFiles": "选择文件",
"loading": "加载中...",
"noFilesSelected": "未选择文件或文件夹",
"folders": "文件夹",
"files": "文件",
"remove": "删除",
"folderAlt": "文件夹",
"fileAlt": "文件"
}
}
},
"createAPIKey": {
"label": "创建新的 API 密钥",
"apiKeyName": "API 密钥名称",
"chunks": "每个查询处理的块",
"prompt": "选择活动提示",
"sourceDoc": "源文档",
"create": "创建"
},
"saveKey": {
"note": "请保存您的密钥",
"disclaimer": "这是您的密钥唯一一次展示机会。",
"copy": "复制",
"copied": "已复制",
"confirm": "我已保存密钥",
"apiKeyLabel": "API Key"
},
"deleteConv": {
"confirm": "您确定要删除所有对话吗?",
"delete": "删除"
},
"shareConv": {
"label": "创建用于分享的公共页面",
"note": "源文档、个人信息和后续对话将保持私密",
"create": "创建",
"option": "允许用户进行更多查询。"
},
"configTool": {
"title": "工具配置",
"type": "类型",
"apiKeyLabel": "API 密钥 / OAuth",
"apiKeyPlaceholder": "输入 API 密钥 / OAuth",
"addButton": "添加工具",
"closeButton": "关闭",
"customNamePlaceholder": "Enter custom name (optional)"
},
"prompts": {
"addPrompt": "添加提示",
"addDescription": "添加自定义提示并保存到 DocsGPT",
"editPrompt": "编辑提示",
"editDescription": "编辑自定义提示并保存到 DocsGPT",
"promptName": "提示名称",
"promptText": "提示文本",
"save": "保存",
"nameExists": "名称已存在",
"deleteConfirmation": "您确定要删除提示'{{name}}'吗?",
"cancel": "取消",
"placeholderText": "在此輸入提示內容...",
"addExamplePlaceholder": "請總結此文本:",
"variablesLabel": "變數",
"variablesSubtext": "點擊以插入提示中",
"variablesDescription": "點擊以插入到提示中",
"systemVariables": "點擊以插入提示中",
"toolVariables": "工具變數",
"systemVariablesDropdownLabel": "系統變數",
"systemVariableOptions": {
"sourceContent": "來源內容",
"sourceSummaries": "內容別名(向後相容)",
"sourceDocuments": "文件物件列表",
"sourceCount": "擷取的文件數量",
"systemDate": "目前日期 (YYYY-MM-DD)",
"systemTime": "目前時間 (HH:MM:SS)",
"systemTimestamp": "ISO 8601 時間戳記",
"systemRequestId": "唯一請求識別碼",
"systemUserId": "目前使用者 ID"
},
"learnAboutPrompts": "了解提示 →",
"publicPromptEditDisabled": "公共提示無法編輯",
"promptTypePublic": "公共",
"promptTypePrivate": "私人"
},
"chunk": {
"add": "添加块",
"edit": "编辑",
"title": "标题",
"enterTitle": "输入标题",
"bodyText": "正文",
"promptText": "提示文本",
"save": "保存",
"close": "关闭",
"cancel": "取消",
"delete": "删除",
"deleteConfirmation": "您确定要删除此块吗?"
},
"addAction": {
"title": "New Action",
"actionNamePlaceholder": "Action Name",
"invalidFormat": "Invalid function name format. Use only letters, numbers, underscores, and hyphens.",
"formatHelp": "Use only letters, numbers, underscores, and hyphens (e.g., `get_data`, `send_report`, etc.)",
"addButton": "Add"
},
"agentDetails": {
"title": "Access Details",
"publicLink": "Public Link",
"apiKey": "API Key",
"webhookUrl": "Webhook URL",
"generate": "Generate",
"test": "Test",
"learnMore": "Learn more"
},
"importSpec": {
"title": "导入 API 规范",
"description": "上传 OpenAPI 3.x 或 Swagger 2.0 规范文件以自动生成操作。",
"dropzoneText": "点击上传或拖拽到此处",
"supportedFormats": "JSON 或 YAML 格式",
"invalidFileType": "文件类型无效。请上传 JSON 或 YAML 文件。",
"parseError": "解析规范失败。请检查文件格式。",
"version": "版本",
"baseUrl": "基础 URL",
"actionsFound": "找到 {{count}} 个操作",
"selectAll": "全选",
"deselectAll": "取消全选",
"cancel": "取消",
"parse": "解析",
"import": "导入 ({{count}})"
}
},
"sharedConv": {
"subtitle": "使用创建",
"button": "开始使用 DocsGPT",
"meta": "DocsGPT 使用 GenAI请使用资源查看关键信息。"
},
"convTile": {
"share": "分享",
"delete": "删除",
"rename": "重命名",
"deleteWarning": "您确定要删除此对话吗?"
},
"pagination": {
"rowsPerPage": "每页行数",
"pageOf": "第 {{currentPage}} 页,共 {{totalPages}} 页",
"firstPage": "第一页",
"previousPage": "上一页",
"nextPage": "下一页",
"lastPage": "最后一页"
},
"conversation": {
"copy": "复制",
"copied": "已复制",
"speak": "朗读",
"answer": "回答",
"edit": {
"update": "更新",
"cancel": "取消",
"placeholder": "输入更新的查询..."
},
"sources": {
"title": "来源",
"text": "来源文本",
"link": "来源链接",
"view_more": "还有{{count}}个来源",
"noSourcesAvailable": "没有可用的来源"
},
"attachments": {
"attach": "附件",
"remove": "删除附件"
},
"retry": "重试",
"reasoning": "推理"
},
"agents": {
"title": "代理",
"description": "发现并创建结合指令、额外知识和任意技能组合的DocsGPT自定义版本",
"newAgent": "新建代理",
"backToAll": "返回所有代理",
"searchPlaceholder": "搜索...",
"noSearchResults": "未找到代理",
"tryDifferentSearch": "请尝试不同的搜索词",
"filters": {
"all": "全部",
"byDocsGPT": "由DocsGPT提供",
"byMe": "我的",
"shared": "与我共享"
},
"sections": {
"template": {
"title": "由DocsGPT提供",
"description": "DocsGPT提供的代理",
"emptyState": "未找到模板代理。"
},
"user": {
"title": "我的代理",
"description": "您创建或发布的代理",
"emptyState": "您还没有创建任何代理。"
},
"shared": {
"title": "与我共享",
"description": "通过公共链接导入的代理",
"emptyState": "未找到共享代理。"
}
},
"form": {
"headings": {
"new": "新建代理",
"edit": "编辑代理",
"draft": "新建代理(草稿)"
},
"buttons": {
"publish": "发布",
"save": "保存",
"saveDraft": "保存草稿",
"cancel": "取消",
"delete": "删除",
"logs": "日志",
"accessDetails": "访问详情",
"add": "添加"
},
"sections": {
"meta": "元数据",
"source": "来源",
"prompt": "提示词",
"tools": "工具",
"agentType": "代理类型",
"models": "模型",
"advanced": "高级",
"preview": "预览"
},
"placeholders": {
"agentName": "代理名称",
"describeAgent": "描述您的代理",
"selectSources": "选择来源",
"chunksPerQuery": "每次查询的块数",
"selectType": "选择类型",
"selectTools": "选择工具",
"selectModels": "为此代理选择模型",
"selectDefaultModel": "选择默认模型",
"enterTokenLimit": "输入令牌限制",
"enterRequestLimit": "输入请求限制"
},
"sourcePopup": {
"title": "选择来源",
"searchPlaceholder": "搜索来源...",
"noOptionsMessage": "没有可用的来源"
},
"toolsPopup": {
"title": "选择工具",
"searchPlaceholder": "搜索工具...",
"noOptionsMessage": "没有可用的工具"
},
"modelsPopup": {
"title": "选择模型",
"searchPlaceholder": "搜索模型...",
"noOptionsMessage": "没有可用的模型"
},
"upload": {
"clickToUpload": "点击上传",
"dragAndDrop": " 或拖放"
},
"agentTypes": {
"classic": "经典",
"react": "ReAct"
},
"labels": {
"defaultModel": "默认模型"
},
"advanced": {
"jsonSchema": "JSON响应架构",
"jsonSchemaDescription": "定义JSON架构以强制执行结构化输出格式",
"validJson": "有效的JSON",
"invalidJson": "无效的JSON - 修复后才能保存",
"tokenLimiting": "令牌限制",
"tokenLimitingDescription": "限制此代理每天可使用的总令牌数",
"requestLimiting": "请求限制",
"requestLimitingDescription": "限制每天可向此代理发出的总请求数"
},
"preview": {
"publishedPreview": "已发布的代理可以在此处预览"
},
"externalKb": "外部知识库"
},
"logs": {
"title": "代理日志",
"lastUsedAt": "最后使用时间",
"noUsageHistory": "无使用历史",
"tableHeader": "代理端点日志"
},
"shared": {
"notFound": "未找到代理。请确保代理已共享。"
},
"preview": {
"testMessage": "在此测试您的代理。已发布的代理可以在对话中使用。"
},
"deleteConfirmation": "您确定要删除此代理吗?"
},
"components": {
"fileUpload": {
"clickToUpload": "Click to upload or drag and drop",
"dropFiles": "Drop the files here",
"fileTypes": "PNG, JPG, JPEG up to",
"sizeLimitUnit": "MB",
"fileSizeError": "File exceeds {{size}}MB limit"
}
},
"pageNotFound": {
"title": "404",
"message": "The page you are looking for does not exist.",
"goHome": "Go Back Home"
},
"filePicker": {
"searchPlaceholder": "搜索文件和文件夹...",
"itemsSelected": "已选择 {{count}} 项",
"name": "名称",
"lastModified": "最后修改",
"size": "大小"
},
"actionButtons": {
"openNewChat": "打开新聊天",
"share": "分享"
},
"mermaid": {
"downloadOptions": "下载选项",
"viewCode": "查看代码",
"decreaseZoom": "缩小",
"resetZoom": "重置缩放",
"increaseZoom": "放大"
},
"navigation": {
"agents": "代理"
},
"notification": {
"ariaLabel": "通知",
"closeAriaLabel": "关闭通知"
},
"prompts": {
"textAriaLabel": "提示文本"
}
}