完善Azure部署困难

This commit is contained in:
huhu415 2024-04-22 17:50:31 +08:00
parent 3d149fedf4
commit 737ceef579
4 changed files with 5 additions and 10 deletions

2
controller/channel-test.go Normal file → Executable file
View File

@ -78,7 +78,7 @@ func testChannel(channel *model.Channel) (err error, openaiErr *relaymodel.Error
} }
request := buildTestRequest() request := buildTestRequest()
request.Model = modelName request.Model = modelName
meta.OriginModelName, meta.ActualModelName = modelName, modelName meta.OriginModelName, meta.ActualModelName = modelName, strings.Split(channel.Models, ",")[0]
convertedRequest, err := adaptor.ConvertRequest(c, relaymode.ChatCompletions, request) convertedRequest, err := adaptor.ConvertRequest(c, relaymode.ChatCompletions, request)
if err != nil { if err != nil {
return err, nil return err, nil

View File

@ -509,8 +509,8 @@
"请输入用户名": "Please enter username", "请输入用户名": "Please enter username",
"请输入显示名称": "Please enter display name", "请输入显示名称": "Please enter display name",
"请输入密码": "Please enter password", "请输入密码": "Please enter password",
"模型部署名称必须和模型名称保持一致": "The model deployment name must be consistent with the model name", "Azure部署名, 要和你的‘模型名称’、‘模型版本’保持一致": "Azure deployment name must be consistent with your model name and model version",
",因为 One API 会把请求体中的 model": ", because One API will take the model in the request body", ". 例如模型名称:gpt-35-turbo, 版本:0613, 那么部署名就叫: gpt-35-turbo-0613.": ". For example, model name: gpt-35-turbo, version: 0613, then the deployment name is: gpt-35-turbo-0613.",
"请输入 AZURE_OPENAI_ENDPOINT": "Please enter AZURE_OPENAI_ENDPOINT", "请输入 AZURE_OPENAI_ENDPOINT": "Please enter AZURE_OPENAI_ENDPOINT",
"请输入自定义渠道的 Base URL": "Please enter the Base URL of the custom channel", "请输入自定义渠道的 Base URL": "Please enter the Base URL of the custom channel",
"Homepage URL 填": "Fill in the Homepage URL", "Homepage URL 填": "Fill in the Homepage URL",

View File

@ -321,10 +321,7 @@ const EditChannel = (props) => {
<div style={{marginTop: 10}}> <div style={{marginTop: 10}}>
<Banner type={"warning"} description={ <Banner type={"warning"} description={
<> <>
注意<strong>模型部署名称必须和模型名称保持一致</strong> One API 注意<strong>Azure部署名, 要和你的模型名称模型版本保持一致</strong>. :gpt-35-turbo, :0613, : gpt-35-turbo-0613.
model
参数替换为你的部署名称模型名称中的点会被剔除<a target='_blank'
href='https://github.com/songquanpeng/one-api/issues/133?notification_referrer_id=NT_kwDOAmJSYrM2NjIwMzI3NDgyOjM5OTk4MDUw#issuecomment-1571602271'>图片演示</a>
</> </>
}> }>
</Banner> </Banner>

View File

@ -244,9 +244,7 @@ const EditChannel = () => {
inputs.type === 3 && ( inputs.type === 3 && (
<> <>
<Message> <Message>
注意<strong>模型部署名称必须和模型名称保持一致</strong> One API model 注意<strong>Azure部署名, 要和你的模型名称模型版本保持一致</strong>. :gpt-35-turbo, :0613, : gpt-35-turbo-0613.
参数替换为你的部署名称模型名称中的点会被剔除<a target='_blank'
href='https://github.com/songquanpeng/one-api/issues/133?notification_referrer_id=NT_kwDOAmJSYrM2NjIwMzI3NDgyOjM5OTk4MDUw#issuecomment-1571602271'>图片演示</a>
</Message> </Message>
<Form.Field> <Form.Field>
<Form.Input <Form.Input