From a326ac4b28222d5aca3a5542c5fe6824968f71a3 Mon Sep 17 00:00:00 2001 From: mrhaoji Date: Wed, 28 Jun 2023 12:56:01 +0800 Subject: [PATCH 1/2] chore: more hints in model mapping textarea (#205) * chore: more hints in model mapping textarea * fix: fix variable not defined --------- Co-authored-by: JustSong --- web/src/constants/channel.constants.js | 2 +- web/src/pages/Channel/EditChannel.js | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/web/src/constants/channel.constants.js b/web/src/constants/channel.constants.js index 6498f033..3cc17685 100644 --- a/web/src/constants/channel.constants.js +++ b/web/src/constants/channel.constants.js @@ -10,4 +10,4 @@ export const CHANNEL_OPTIONS = [ { key: 9, text: 'AI.LS', value: 9, color: 'yellow' }, { key: 10, text: 'AI Proxy', value: 10, color: 'purple' }, { key: 12, text: 'API2GPT', value: 12, color: 'blue' } -]; +]; \ No newline at end of file diff --git a/web/src/pages/Channel/EditChannel.js b/web/src/pages/Channel/EditChannel.js index ec04234d..40b25d18 100644 --- a/web/src/pages/Channel/EditChannel.js +++ b/web/src/pages/Channel/EditChannel.js @@ -4,6 +4,12 @@ import { useParams } from 'react-router-dom'; import { API, showError, showInfo, showSuccess, verifyJSON } from '../../helpers'; import { CHANNEL_OPTIONS } from '../../constants'; +const MODEL_MAPPING_EXAMPLE = { + 'gpt-3.5-turbo-0301': 'gpt-3.5-turbo', + 'gpt-4-0314': 'gpt-4', + 'gpt-4-32k-0314': 'gpt-4-32k' +}; + const EditChannel = () => { const params = useParams(); const channelId = params.id; @@ -15,7 +21,7 @@ const EditChannel = () => { key: '', base_url: '', other: '', - model_mapping:'', + model_mapping: '', models: [], groups: ['default'] }; @@ -98,7 +104,7 @@ const EditChannel = () => { showInfo('请至少选择一个模型!'); return; } - if (inputs.model_mapping !== "" && !verifyJSON(inputs.model_mapping)) { + if (inputs.model_mapping !== '' && !verifyJSON(inputs.model_mapping)) { showInfo('模型映射必须是合法的 JSON 格式!'); return; } @@ -257,11 +263,11 @@ const EditChannel = () => { From 0ce572b4051394a3e52411da40377adba404f573 Mon Sep 17 00:00:00 2001 From: Archer <545436317@qq.com> Date: Wed, 28 Jun 2023 13:01:29 +0800 Subject: [PATCH 2/2] docs: update README (#210) * deploy docs * docs: update README --------- Co-authored-by: JustSong --- README.en.md | 9 +++++++++ README.md | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/README.en.md b/README.en.md index f98db2e7..4f900f3c 100644 --- a/README.en.md +++ b/README.en.md @@ -174,6 +174,15 @@ Refer to [#175](https://github.com/songquanpeng/one-api/issues/175) for detailed If you encounter a blank page after deployment, refer to [#97](https://github.com/songquanpeng/one-api/issues/97) for possible solutions. ### Deployment on Third-Party Platforms +
+Deploy on Sealos +
+ +Please refer to [this tutorial](https://github.com/c121914yu/FastGPT/blob/main/docs/deploy/one-api/sealos.md). + +
+
+
Deployment on Zeabur
diff --git a/README.md b/README.md index 14c8e0bf..b522e5fb 100644 --- a/README.md +++ b/README.md @@ -195,6 +195,17 @@ docker run --name chatgpt-web -d -p 3002:3002 -e OPENAI_API_BASE_URL=https://ope 注意修改端口号、`OPENAI_API_BASE_URL` 和 `OPENAI_API_KEY`。 ### 部署到第三方平台 +
+部署到 Sealos +
+ +> Sealos 可视化部署,仅需 1 分钟。 + +参考这个[教程](https://github.com/c121914yu/FastGPT/blob/main/docs/deploy/one-api/sealos.md)中 1~5 步。 + +
+
+
部署到 Zeabur