fix: remove the dot in model name (#57)

This commit is contained in:
JustSong 2023-05-13 12:24:49 +08:00
parent da9ccb528d
commit 73aa53f536
3 changed files with 3 additions and 2 deletions

View File

@ -44,7 +44,7 @@ _✨ All in one 的 OpenAI 接口,整合各种 API 访问方式,开箱即用
1. 支持多种 API 访问渠道,欢迎 PR 或提 issue 添加更多渠道:
+ [x] OpenAI 官方通道
+ [x] [API2D](https://api2d.com/r/197971)
+ [ ] Azure OpenAI API
+ [x] Azure OpenAI API
+ [x] [CloseAI](https://console.openai-asia.com)
+ [x] [OpenAI-SB](https://openai-sb.com)
+ [x] [OpenAI Max](https://openaimax.com)

View File

@ -100,6 +100,7 @@ func relayHelper(c *gin.Context) error {
baseURL = c.GetString("base_url")
task := strings.TrimPrefix(requestURL, "/v1/")
model_ := textRequest.Model
model_ = strings.Replace(model_, ".", "", -1)
fullRequestURL = fmt.Sprintf("%s/openai/deployments/%s/%s", baseURL, model_, task)
}
req, err := http.NewRequest(c.Request.Method, fullRequestURL, c.Request.Body)

View File

@ -80,7 +80,7 @@ const EditChannel = () => {
inputs.type === 3 && (
<>
<Message>
注意创建资源时部署名称必须OpenAI 官方的模型名称保持一致因为 One API 会把请求体中的 model 参数替换为你的部署名称
注意创建资源时部署名称必须模型名称保持一致因为 One API 会把请求体中的 model 参数替换为你的部署名称模型名称中的点会被剔除
</Message>
<Form.Field>
<Form.Input