Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ feat: support OpenAPI in plugin manifest #614

Merged
merged 16 commits into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .i18nrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const { defineConfig } = require('@lobehub/i18n-cli');

module.exports = defineConfig({
entry: 'locales/zh_CN',
reference: '翻译后的字数尽量和原文一致',
entryLocale: 'zh_CN',
output: 'locales',
outputLocales: ['zh_TW', 'en_US', 'ru_RU', 'ja_JP', 'ko_KR', 'fr_FR'],
Expand Down
24 changes: 12 additions & 12 deletions locales/en_US/chat.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"agentDefaultMessage": "Hello, I'm **{{name}}**. You can start chatting with me right away, or go to [Assistant Settings](/chat/settings#session={{id}}) to complete my information.",
"agentDefaultMessage": "Hello, I'm **{{name}}**. You can start chatting with me right away, or go to [Agent Settings](/chat/settings#session={{id}}) to complete my information.",
"agentDefaultMessageWithSystemRole": "Hello, I'm **{{name}}**, {{systemRole}}. Let's start chatting!",
"backToBottom": "Back to Bottom",
"backToBottom": "Back to bottom",
"clearCurrentMessages": "Clear current session messages",
"confirmClearCurrentMessages": "You are about to clear the current session messages. Once cleared, they cannot be retrieved. Please confirm your action.",
"confirmRemoveSessionItemAlert": "You are about to delete this assistant. Once deleted, it cannot be retrieved. Please confirm your action.",
"defaultAgent": "Default Assistant",
"defaultSession": "Default Assistant",
"confirmRemoveSessionItemAlert": "You are about to delete this agent. Once deleted, it cannot be retrieved. Please confirm your action.",
"defaultAgent": "Default Agent",
"defaultSession": "Default Agent",
"historyRange": "History Range",
"inbox": {
"defaultMessage": "Hello, I'm your virtual assistant. You can ask me anything, and I'll do my best to answer you. If you need a more professional or customized assistant, click on `+` to create a custom assistant.",
"desc": "Activate the brain cluster and spark creative thinking. Your virtual assistant is here to communicate with you about everything.",
"defaultMessage": "Hello, I'm your virtual agent. You can ask me anything, and I'll do my best to answer you. If you need a more professional or customized agent, click on `+` to create a custom agent.",
"desc": "Activate the brain cluster and spark creative thinking. Your virtual agent is here to communicate with you about everything.",
"title": "Just Chat"
},
"newAgent": "New Assistant",
"newAgent": "New Agent",
"noDescription": "No description available",
"pin": "Pin",
"pinOff": "Unpin",
"regenerate": "Regenerate",
"roleAndArchive": "Role and Archive",
"searchAgentPlaceholder": "Search assistants and conversations...",
"searchAgentPlaceholder": "Search agents and conversations...",
"send": "Send",
"sendPlaceholder": "Type your message here...",
"sessionList": "Assistant List",
"sessionList": "Agent List",
"shareModal": {
"download": "Download Screenshot",
"imageType": "Image Format",
Expand All @@ -32,7 +32,7 @@
"withBackground": "Include Background Image",
"withFooter": "Include Footer",
"withPluginInfo": "Include Plugin Information",
"withSystemRole": "Include Assistant Role Setting"
"withSystemRole": "Include Agent Role Setting"
},
"stop": "Stop",
"stt": {
Expand Down Expand Up @@ -67,7 +67,7 @@
"action": "Text-to-Speech",
"clear": "Clear Speech"
},
"updateAgent": "Update Assistant Information",
"updateAgent": "Update Agent Information",
"upload": {
"actionTooltip": "Upload Image",
"dragDesc": "Drag and drop files here, support uploading multiple images. Hold down Shift to send images directly.",
Expand Down
8 changes: 4 additions & 4 deletions locales/en_US/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@
"lang": {
"en": "English",
"en-US": "English",
"fr-FR": "French",
"ja-JP": "Japanese",
"ko-KR": "Korean",
"ru-RU": "Russian",
"zh": "Simplified Chinese",
"zh-CN": "Simplified Chinese",
"zh-TW": "Traditional Chinese",
"fr-FR": "French"
"zh-TW": "Traditional Chinese"
},
"layoutInitializing": "Initializing layout...",
"noDescription": "No description available",
Expand All @@ -82,8 +82,8 @@
"temp": "Temporary",
"updateAgent": "Update Agent Information",
"upgradeVersion": {
"action": "Upgrade",
"hasNew": "New update available",
"newVersion": "New version available: {{version}}",
"action": "Upgrade"
"newVersion": "New version available: {{version}}"
}
}
30 changes: 16 additions & 14 deletions locales/en_US/error.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@
"503": "Sorry, the server is currently unable to process your request, possibly due to overload or maintenance. Please try again later.",
"504": "Sorry, the server did not receive a response from the upstream server. Please try again later.",
"InvalidAccessCode": "The password is incorrect or empty. Please enter the correct access password or add a custom OpenAI API Key.",
"NoAPIKey": "OpenAI API Key is empty, please add a custom OpenAI API Key",
"OpenAIBizError": "Error requesting OpenAI service. Please troubleshoot or retry based on the following information.",
"PluginMarketIndexNotFound": "Sorry, the server could not find the plugin index. Please check if the index address is correct",
"PluginMarketIndexInvalid": "Sorry, the plugin index validation failed. Please check if the index file format is correct",
"PluginMetaNotFound": "Sorry, the plugin was not found in the index. Please check the plugin's configuration information in the index",
"PluginMetaInvalid": "Sorry, the plugin's metadata validation failed. Please check if the plugin metadata format is correct",
"PluginManifestNotFound": "Sorry, the server could not find the plugin's manifest file (manifest.json). Please check if the plugin manifest file address is correct",
"PluginManifestInvalid": "Sorry, the plugin's manifest validation failed. Please check if the manifest format is correct",
"PluginApiNotFound": "Sorry, the API does not exist in the plugin's manifest. Please check if your request method matches the plugin manifest API",
"PluginApiParamsError": "Sorry, the input parameter validation for the plugin request failed. Please check if the input parameters match the API description",
"PluginSettingsInvalid": "This plugin needs to be correctly configured before it can be used. Please check if your configuration is correct",
"PluginGatewayError": "Sorry, there was an error with the plugin gateway. Please check if the plugin gateway configuration is correct.",
"PluginManifestInvalid": "Sorry, the plugin's manifest validation failed. Please check if the manifest format is correct",
"PluginManifestNotFound": "Sorry, the server could not find the plugin's manifest file (manifest.json). Please check if the plugin manifest file address is correct",
"PluginMarketIndexInvalid": "Sorry, the plugin index validation failed. Please check if the index file format is correct",
"PluginMarketIndexNotFound": "Sorry, the server could not find the plugin index. Please check if the index address is correct",
"PluginMetaInvalid": "Sorry, the plugin's metadata validation failed. Please check if the plugin metadata format is correct",
"PluginMetaNotFound": "Sorry, the plugin was not found in the index. Please check the plugin's configuration information in the index",
"PluginOpenApiInitError": "Sorry, the OpenAPI client failed to initialize. Please check if the OpenAPI configuration information is correct.",
"PluginServerError": "Plugin server request returned an error. Please check your plugin manifest file, plugin configuration, or server implementation based on the error information below",
"NoAPIKey": "OpenAI API Key is empty, please add a custom OpenAI API Key"
"PluginSettingsInvalid": "This plugin needs to be correctly configured before it can be used. Please check if your configuration is correct"
},
"stt": {
"responseError": "Service request failed, please check the configuration or try again"
Expand All @@ -36,16 +38,16 @@
},
"unlock": {
"apikey": {
"title": "Use Custom API Key",
"addProxyUrl": "Add OpenAI Proxy URL (optional)",
"description": "Enter your OpenAI API Key to start the conversation. The application will not record your API Key.",
"addProxyUrl": "Add OpenAI Proxy URL (optional)"
"title": "Use Custom API Key"
},
"closeMessage": "Close message",
"confirm": "Confirm and Retry",
"password": {
"description": "The application encryption has been enabled by the administrator. Enter the application password to unlock the application. The password only needs to be filled in once.",
"title": "Enter Password to Unlock Application",
"placeholder": "Please enter password"
},
"closeMessage": "Close message"
"placeholder": "Please enter password",
"title": "Enter Password to Unlock Application"
}
}
}
4 changes: 2 additions & 2 deletions locales/en_US/market.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"submitAgent": "Submit Agent",
"title": {
"recentSubmits": "Recent Submits",
"allAgents": "All Agents"
"allAgents": "All Agents",
"recentSubmits": "Recent Submits"
}
}
8 changes: 4 additions & 4 deletions locales/en_US/migration.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"title": "High Capacity"
},
"performance": {
"title": "High Performance",
"desc": "Millions of messages are automatically indexed, and retrieval queries respond in milliseconds."
"desc": "Millions of messages are automatically indexed, and retrieval queries respond in milliseconds.",
"title": "High Performance"
},
"use": {
"desc": "Supports searching for titles, descriptions, tags, message content, and even translated text, greatly improving daily search efficiency.",
Expand All @@ -28,8 +28,8 @@
"title": "LobeChat Data Evolution",
"upgrade": {
"error": {
"title": "Database Upgrade Failed",
"subTitle": "We are sorry, an error occurred during the database upgrade process. Please try the following solutions: A. Clear local data and re-import backup data; B. Click the 'Retry Upgrade' button.<br><br> If the issue persists, please <1>submit a request</1>, and we will assist you as soon as possible."
"subTitle": "We are sorry, an error occurred during the database upgrade process. Please try the following solutions: A. Clear local data and re-import backup data; B. Click the 'Retry Upgrade' button.<br><br> If the issue persists, please <1>submit a request</1>, and we will assist you as soon as possible.",
"title": "Database Upgrade Failed"
},
"success": {
"subTitle": "LobeChat's database has been successfully upgraded to the latest version. Start experiencing it now!",
Expand Down
113 changes: 75 additions & 38 deletions locales/en_US/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,128 +2,165 @@
"debug": {
"arguments": "Arguments",
"function_call": "Function Call",
"off": "Turn Off Debug",
"on": "View Plugin Call Information",
"off": "Turn off debug",
"on": "View plugin invocation information",
"response": "Response"
},
"detailModal": {
"info": {
"description": "API Description",
"name": "API Name"
},
"tabs": {
"info": "Plugin Capabilities",
"manifest": "Installation File",
"settings": "Settings"
},
"title": "Plugin Details"
},
"dev": {
"confirmDeleteDevPlugin": "Are you sure you want to delete this local plugin? Once deleted, it cannot be recovered.",
"customParams": {
"useProxy": {
"label": "Install via proxy (if encountering cross-origin access errors, try enabling this option and reinstalling)"
}
},
"deleteSuccess": "Plugin deleted successfully",
"manifest": {
"identifier": {
"desc": "Unique identifier for the plugin",
"desc": "The unique identifier of the plugin",
"label": "Identifier"
},
"mode": {
"local": "Local Configuration",
"local-tooltip": "Local configuration is temporarily not supported",
"local": "Visual Configuration",
"local-tooltip": "Visual configuration is not supported at the moment",
"url": "Online Link"
},
"name": {
"desc": "Plugin title",
"desc": "The title of the plugin",
"label": "Title",
"placeholder": "Search Engine"
}
},
"meta": {
"author": {
"desc": "Author of the plugin",
"desc": "The author of the plugin",
"label": "Author"
},
"avatar": {
"desc": "Plugin icon, can use Emoji or URL",
"desc": "The icon of the plugin, can be an Emoji or a URL",
"label": "Icon"
},
"description": {
"desc": "Plugin description",
"desc": "The description of the plugin",
"label": "Description",
"placeholder": "Query search engine for information"
"placeholder": "Get information from search engines"
},
"formFieldRequired": "This field is required",
"homepage": {
"desc": "Plugin homepage",
"desc": "The homepage of the plugin",
"label": "Homepage"
},
"identifier": {
"desc": "Unique identifier for the plugin, will be automatically recognized from the manifest",
"errorDuplicate": "Identifier is already used by another plugin, please modify the identifier",
"desc": "The unique identifier of the plugin, only supports alphanumeric characters, hyphen -, and underscore _",
"errorDuplicate": "The identifier is already used by another plugin, please modify the identifier",
"label": "Identifier",
"pattenErrorMessage": "Only English characters, numbers, - and _ are allowed"
"pattenErrorMessage": "Only alphanumeric characters, hyphen -, and underscore _ are allowed"
},
"manifest": {
"desc": "LobeChat will install the plugin through this link",
"label": "Plugin Description File (Manifest) URL",
"desc": "LobeChat will install the plugin using this link",
"label": "Plugin Description (Manifest) URL",
"preview": "Preview Manifest",
"refresh": "Refresh"
},
"title": {
"desc": "Plugin title",
"desc": "The title of the plugin",
"label": "Title",
"placeholder": "Search Engine"
}
},
"metaConfig": "Plugin metadata configuration",
"modalDesc": "After adding a custom plugin, it can be used for plugin development validation or directly in the session. For plugin development, please refer to the <1>development documentation↗</>.",
"modalDesc": "After adding a custom plugin, it can be used for plugin development verification or directly in the session. Please refer to the <1>development documentation↗</> for plugin development.",
"openai": {
"importUrl": "Import from URL link",
"schema": "Schema"
},
"preview": {
"card": "Preview Plugin Display",
"desc": "Preview Plugin Description",
"card": "Preview of plugin display",
"desc": "Preview of plugin description",
"title": "Plugin Name Preview"
},
"save": "Install Plugin",
"saveSuccess": "Plugin settings saved successfully",
"tabs": {
"manifest": "Manifest Description",
"manifest": "Function Description Manifest (Manifest)",
"meta": "Plugin Metadata"
},
"title": "Add Custom Plugin",
"title": {
"create": "Add Custom Plugin",
"edit": "Edit Custom Plugin"
},
"type": {
"lobe": "LobeChat Plugin",
"openai": "OpenAI Plugin"
},
"update": "Update",
"updateSuccess": "Plugin settings updated successfully"
},
"error": {
"fetchError": "Failed to fetch the manifest link. Please ensure the link is valid and allows cross-origin access.",
"installError": "Failed to install plugin {{name}}",
"manifestInvalid": "The manifest does not comply with the specification. Validation result: \n\n {{error}}",
"installError": "Plugin {{name}} installation failed",
"manifestInvalid": "The manifest does not conform to the specification. Validation result: \n\n {{error}}",
"noManifest": "Manifest file does not exist",
"openAPIInvalid": "OpenAPI parsing failed. Error: \n\n {{error}}",
"reinstallError": "Failed to refresh plugin {{name}}",
"urlError": "The link did not return content in JSON format. Please ensure it is a valid link"
"urlError": "The link did not return content in JSON format. Please ensure it is a valid link."
},
"list": {
"item": {
"deprecated.title": "Deprecated",
"deprecated.title": "Deleted",
"local.config": "Configuration",
"local.title": "Custom"
"local.title": "Local"
}
},
"loading": {
"content": "Calling plugin...",
"plugin": "Plugin running..."
"plugin": "Plugin is running..."
},
"pluginList": "Plugin List",
"plugins": {
"loading": "Checking plugins...",
"unknown": "Unknown plugin"
"loading": "Detecting plugins...",
"unknown": "Unknown Plugin"
},
"setting": "Plugin Settings",
"settings": {
"indexUrl": {
"title": "Marketplace Index",
"tooltip": "Online editing is not supported for now. Please set it through environment variables during deployment."
"tooltip": "Editing is not supported at the moment"
},
"modalDesc": "After configuring the address of the plugin marketplace, you can use a custom plugin marketplace.",
"title": "Set Plugin Marketplace"
"modalDesc": "After configuring the address of the plugin marketplace, you can use a custom plugin marketplace",
"title": "Configure Plugin Marketplace"
},
"store": {
"actions": {
"confirmUninstall": "The plugin is about to be uninstalled. After uninstalling, the plugin configuration will be cleared. Please confirm your operation.",
"detail": "Details",
"install": "Install",
"manifest": "Edit Installation File",
"settings": "Settings",
"uninstall": "Uninstall"
},
"communityPlugin": "Third-party",
"customPlugin": "Custom Plugin",
"empty": "No installed plugins yet",
"install": "Install",
"installAllPlugins": "Install All",
"networkError": "Failed to fetch the plugin store. Please check your network connection and try again.",
"networkError": "Failed to fetch plugin store. Please check your network connection and try again",
"placeholder": "Search for plugin name, description, or keyword...",
"releasedAt": "Released at {{createdAt}}",
"tabs": {
"all": "All",
"installed": "Installed"
},
"title": "Plugin Store",
"uninstall": "Uninstall",
"placeholder": "Search for plugin name, description, or keywords..."
"title": "Plugin Store"
}
}
Loading
Loading