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
6e3c15e9
authored
Jun 16, 2023
by
JustSong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: update README
parent
8979961a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
README.md
+17
-2
No files found.
README.md
View file @
6e3c15e9
...
...
@@ -33,6 +33,8 @@ _✨ All in one 的 OpenAI 接口,整合各种 API 访问方式,开箱即用
·
<a
href=
"https://github.com/songquanpeng/one-api#部署"
>
部署教程
</a>
·
<a
href=
"https://github.com/songquanpeng/one-api#使用方法"
>
使用方法
</a>
·
<a
href=
"https://github.com/songquanpeng/one-api/issues"
>
意见反馈
</a>
·
<a
href=
"https://github.com/songquanpeng/one-api#截图展示"
>
截图展示
</a>
...
...
@@ -158,11 +160,24 @@ sudo service nginx restart
等到系统启动后,使用
`
root
`
用户登录系统并做进一步的配置。
## 使用方
式
在`
渠道
`页面中添加你的 API Key,之后在`
令牌
`页面中新增
一个
访问令牌。
## 使用方
法
在
`
渠道
`
页面中添加你的 API Key,之后在
`
令牌
`
页面中新增访问令牌。
之后就可以使用你的令牌访问 One API 了,使用方式与
[
OpenAI API]
(
https://platform.openai.com/docs/api-reference/introduction
)
一致。
你需要在各种用到 OpenAI API 的地方设置 API Base 为你的 One API 的部署地址,例如:
`
https://openai.justsong.cn
`
,API Key 则为你在 One API 中生成的令牌。
注意,具体的 API Base 的格式取决于你所使用的客户端。
```
mermaid
graph LR
A(用户)
A --->|请求| B(One API)
B -->|中继请求| C(OpenAI)
B -->|中继请求| D(Azure)
B -->|中继请求| E(其他下游渠道)
```
可以通过在令牌后面添加渠道 ID 的方式指定使用哪一个渠道处理本次请求,例如:
`Authorization: Bearer ONE_API_KEY-CHANNEL_ID`
。
注意,需要是管理员用户创建的令牌才能指定渠道 ID。
...
...
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