Merge pull request #88 from songquanpeng/main
Fork Sync: Update from parent repository
This commit is contained in:
commit
bca2c444c4
@ -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.
|
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
|
### Deployment on Third-Party Platforms
|
||||||
|
<details>
|
||||||
|
<summary><strong>Deploy on Sealos</strong></summary>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
Please refer to [this tutorial](https://github.com/c121914yu/FastGPT/blob/main/docs/deploy/one-api/sealos.md).
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary><strong>Deployment on Zeabur</strong></summary>
|
<summary><strong>Deployment on Zeabur</strong></summary>
|
||||||
<div>
|
<div>
|
||||||
|
11
README.md
11
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`。
|
注意修改端口号、`OPENAI_API_BASE_URL` 和 `OPENAI_API_KEY`。
|
||||||
|
|
||||||
### 部署到第三方平台
|
### 部署到第三方平台
|
||||||
|
<details>
|
||||||
|
<summary><strong>部署到 Sealos </strong></summary>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
> Sealos 可视化部署,仅需 1 分钟。
|
||||||
|
|
||||||
|
参考这个[教程](https://github.com/c121914yu/FastGPT/blob/main/docs/deploy/one-api/sealos.md)中 1~5 步。
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary><strong>部署到 Zeabur</strong></summary>
|
<summary><strong>部署到 Zeabur</strong></summary>
|
||||||
<div>
|
<div>
|
||||||
|
@ -4,6 +4,12 @@ import { useParams } from 'react-router-dom';
|
|||||||
import { API, showError, showInfo, showSuccess, verifyJSON } from '../../helpers';
|
import { API, showError, showInfo, showSuccess, verifyJSON } from '../../helpers';
|
||||||
import { CHANNEL_OPTIONS } from '../../constants';
|
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 EditChannel = () => {
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
const channelId = params.id;
|
const channelId = params.id;
|
||||||
@ -102,7 +108,7 @@ const EditChannel = () => {
|
|||||||
showInfo('请至少选择一个模型!');
|
showInfo('请至少选择一个模型!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (inputs.model_mapping !== "" && !verifyJSON(inputs.model_mapping)) {
|
if (inputs.model_mapping !== '' && !verifyJSON(inputs.model_mapping)) {
|
||||||
showInfo('模型映射必须是合法的 JSON 格式!');
|
showInfo('模型映射必须是合法的 JSON 格式!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -276,11 +282,11 @@ const EditChannel = () => {
|
|||||||
<Form.Field>
|
<Form.Field>
|
||||||
<Form.TextArea
|
<Form.TextArea
|
||||||
label='模型映射'
|
label='模型映射'
|
||||||
placeholder={'为一个 JSON 文本,键为用户请求的模型名称,值为要替换的模型名称'}
|
placeholder={`为一个 JSON 文本,键为用户请求的模型名称,值为要替换的模型名称,例如:\n${JSON.stringify(MODEL_MAPPING_EXAMPLE, null, 2)}`}
|
||||||
name='model_mapping'
|
name='model_mapping'
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
value={inputs.model_mapping}
|
value={inputs.model_mapping}
|
||||||
style={{ minHeight: 100, fontFamily: 'JetBrains Mono, Consolas' }}
|
style={{ minHeight: 150, fontFamily: 'JetBrains Mono, Consolas' }}
|
||||||
autoComplete='new-password'
|
autoComplete='new-password'
|
||||||
/>
|
/>
|
||||||
</Form.Field>
|
</Form.Field>
|
||||||
|
Loading…
Reference in New Issue
Block a user