chore: update /v1-openai to /v1 in playground test code
This commit is contained in:
@@ -103,7 +103,7 @@ export default {
|
|||||||
'Specify the model directory that contains .safetensors and config.json files, e.g., /usr/local/models/model/.',
|
'Specify the model directory that contains .safetensors and config.json files, e.g., /usr/local/models/model/.',
|
||||||
'models.localpath.chunks.tips': `Specify the first shard file of the model, e.g., /usr/local/models/model-00001-of-00004.gguf.`,
|
'models.localpath.chunks.tips': `Specify the first shard file of the model, e.g., /usr/local/models/model-00001-of-00004.gguf.`,
|
||||||
'models.form.replicas.tips':
|
'models.form.replicas.tips':
|
||||||
'Multiple replicas enable load balancing for /v1-openai inference requests.',
|
'Multiple replicas enable load balancing for { api } inference requests.',
|
||||||
'models.table.list.empty': 'No Models yet!',
|
'models.table.list.empty': 'No Models yet!',
|
||||||
'models.table.list.getStart':
|
'models.table.list.getStart':
|
||||||
'<span style="margin-right: 5px;font-size: 13px;">Get started with</span> <span style="font-size: 14px;font-weight: 700">DeepSeek-R1-Distill-Qwen-1.5B</span>'
|
'<span style="margin-right: 5px;font-size: 13px;">Get started with</span> <span style="font-size: 14px;font-weight: 700">DeepSeek-R1-Distill-Qwen-1.5B</span>'
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ export default {
|
|||||||
'指向包含 .safetensors, config.json 文件的模型目录,例如 /usr/local/models/model/',
|
'指向包含 .safetensors, config.json 文件的模型目录,例如 /usr/local/models/model/',
|
||||||
'models.localpath.chunks.tips':
|
'models.localpath.chunks.tips':
|
||||||
'指向模型第一个分片文件,例如 /usr/local/models/model-00001-of-00004.gguf',
|
'指向模型第一个分片文件,例如 /usr/local/models/model-00001-of-00004.gguf',
|
||||||
'models.form.replicas.tips': '多副本数实现 /v1-openai 接口推理请求的负载均衡',
|
'models.form.replicas.tips': '多副本数实现 { api } 接口推理请求的负载均衡',
|
||||||
'models.table.list.empty': '暂无已部署模型',
|
'models.table.list.empty': '暂无已部署模型',
|
||||||
'models.table.list.getStart':
|
'models.table.list.getStart':
|
||||||
'<span style="margin-right: 5px;font-size: 13px;">一键部署</span><span style="font-size: 14px;font-weight: 700">DeepSeek-R1-Distill-Qwen-1.5B</span><span style="margin-left: 5px;font-size: 13px;">立即使用!</span>'
|
'<span style="margin-right: 5px;font-size: 13px;">一键部署</span><span style="font-size: 14px;font-weight: 700">DeepSeek-R1-Distill-Qwen-1.5B</span><span style="margin-left: 5px;font-size: 13px;">立即使用!</span>'
|
||||||
|
|||||||
@@ -668,7 +668,10 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
|
|||||||
id: 'models.form.replicas'
|
id: 'models.form.replicas'
|
||||||
})}
|
})}
|
||||||
required
|
required
|
||||||
description={intl.formatMessage({ id: 'models.form.replicas.tips' })}
|
description={intl.formatMessage(
|
||||||
|
{ id: 'models.form.replicas.tips' },
|
||||||
|
{ api: `${window.location.origin}/v1` }
|
||||||
|
)}
|
||||||
min={0}
|
min={0}
|
||||||
></SealInput.Number>
|
></SealInput.Number>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ type AddModalProps = {
|
|||||||
open: boolean;
|
open: boolean;
|
||||||
source: string;
|
source: string;
|
||||||
width?: string | number;
|
width?: string | number;
|
||||||
gpuOptions?: any[];
|
gpuOptions: any[];
|
||||||
onOk: (values: FormData) => void;
|
onOk: (values: FormData) => void;
|
||||||
onCancel: () => void;
|
onCancel: () => void;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -769,7 +769,10 @@ const Models: React.FC<ModelsProps> = ({
|
|||||||
{
|
{
|
||||||
title: (
|
title: (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={intl.formatMessage({ id: 'models.form.replicas.tips' })}
|
title={intl.formatMessage(
|
||||||
|
{ id: 'models.form.replicas.tips' },
|
||||||
|
{ api: `${window.location.origin}/v1` }
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
{intl.formatMessage({ id: 'models.form.replicas' })}
|
{intl.formatMessage({ id: 'models.form.replicas' })}
|
||||||
<QuestionCircleOutlined className="m-l-5" />
|
<QuestionCircleOutlined className="m-l-5" />
|
||||||
|
|||||||
@@ -380,7 +380,10 @@ const UpdateModal: React.FC<AddModalProps> = (props) => {
|
|||||||
form={form}
|
form={form}
|
||||||
onFinish={handleOk}
|
onFinish={handleOk}
|
||||||
preserve={false}
|
preserve={false}
|
||||||
initialValues={formData}
|
clearOnDestroy={true}
|
||||||
|
initialValues={{
|
||||||
|
...formData
|
||||||
|
}}
|
||||||
style={{
|
style={{
|
||||||
padding: 'var(--ant-modal-content-padding)',
|
padding: 'var(--ant-modal-content-padding)',
|
||||||
paddingBlock: 0
|
paddingBlock: 0
|
||||||
@@ -491,9 +494,12 @@ const UpdateModal: React.FC<AddModalProps> = (props) => {
|
|||||||
id: 'models.form.replicas'
|
id: 'models.form.replicas'
|
||||||
})}
|
})}
|
||||||
required
|
required
|
||||||
description={intl.formatMessage({
|
description={intl.formatMessage(
|
||||||
id: 'models.form.replicas.tips'
|
{
|
||||||
})}
|
id: 'models.form.replicas.tips'
|
||||||
|
},
|
||||||
|
{ api: `${window.location.origin}/v1` }
|
||||||
|
)}
|
||||||
min={0}
|
min={0}
|
||||||
></SealInput.Number>
|
></SealInput.Number>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { request } from '@umijs/max';
|
import { request } from '@umijs/max';
|
||||||
|
|
||||||
export const OPENAI_COMPATIBLE = 'v1-openai';
|
export const OPENAI_COMPATIBLE = 'v1';
|
||||||
|
|
||||||
export const CHAT_API = `/${OPENAI_COMPATIBLE}/chat/completions`;
|
export const CHAT_API = `/${OPENAI_COMPATIBLE}/chat/completions`;
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ export const EDIT_IMAGE_API = `/${OPENAI_COMPATIBLE}/images/edits`;
|
|||||||
|
|
||||||
export const EMBEDDING_API = `/${OPENAI_COMPATIBLE}/embeddings`;
|
export const EMBEDDING_API = `/${OPENAI_COMPATIBLE}/embeddings`;
|
||||||
|
|
||||||
export const OPENAI_MODELS = `/${OPENAI_COMPATIBLE}/models`;
|
export const OPENAI_MODELS = `/v1-openai/models`;
|
||||||
|
|
||||||
export const RERANKER_API = '/rerank';
|
export const RERANKER_API = '/rerank';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user