Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b4bfc952
authored
May 13, 2023
by
JustSong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: remove the dot in model name (#57)
parent
f957def4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
README.md
+1
-1
controller/relay.go
+1
-0
web/src/pages/Channel/EditChannel.js
+1
-1
No files found.
README.md
View file @
b4bfc952
...
...
@@ -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)
...
...
controller/relay.go
View file @
b4bfc952
...
...
@@ -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
)
...
...
web/src/pages/Channel/EditChannel.js
View file @
b4bfc952
...
...
@@ -80,7 +80,7 @@ const EditChannel = () => {
inputs
.
type
===
3
&&
(
<>
<
Message
>
注意,创建资源时,部署名称必须
和
OpenAI
官方的模型名称保持一致,因为
One
API
会把请求体中的
model
参数替换为你的部署名称
。
注意,创建资源时,部署名称必须
模型名称保持一致,因为
One
API
会把请求体中的
model
参数替换为你的部署名称(模型名称中的点会被剔除)
。
<
/Message
>
<
Form
.
Field
>
<
Form
.
Input
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment