chore: more hints in model mapping textarea
This commit is contained in:
parent
737672fb0b
commit
a81ce2e3e3
@ -11,3 +11,8 @@ export const CHANNEL_OPTIONS = [
|
||||
{ key: 10, text: 'AI Proxy', value: 10, color: 'purple' },
|
||||
{ key: 12, text: 'API2GPT', value: 12, color: 'blue' }
|
||||
];
|
||||
export 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"
|
||||
};
|
@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
|
||||
import { Button, Form, Header, Message, Segment } from 'semantic-ui-react';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { API, showError, showInfo, showSuccess, verifyJSON } from '../../helpers';
|
||||
import { CHANNEL_OPTIONS } from '../../constants';
|
||||
import { CHANNEL_OPTIONS, MODEL_MAPPING_EXAMPLE } from '../../constants';
|
||||
|
||||
const EditChannel = () => {
|
||||
const params = useParams();
|
||||
@ -257,11 +257,11 @@ const EditChannel = () => {
|
||||
<Form.Field>
|
||||
<Form.TextArea
|
||||
label='模型映射'
|
||||
placeholder={'为一个 JSON 文本,键为用户请求的模型名称,值为要替换的模型名称'}
|
||||
placeholder={`为一个 JSON 文本,键为用户请求的模型名称,值为要替换的模型名称,例如:\n${JSON.stringify(modelMappingExample, null, 2)}`}
|
||||
name='model_mapping'
|
||||
onChange={handleInputChange}
|
||||
value={inputs.model_mapping}
|
||||
style={{ minHeight: 100, fontFamily: 'JetBrains Mono, Consolas' }}
|
||||
style={{ minHeight: 150, fontFamily: 'JetBrains Mono, Consolas' }}
|
||||
autoComplete='new-password'
|
||||
/>
|
||||
</Form.Field>
|
||||
|
Loading…
Reference in New Issue
Block a user