acheong08 / ChatGPT-to-API

Scalable unofficial ChatGPT API for production.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

请问如何添加多个access_tokens

LNpks opened this issue · comments

commented

请问如何添加多个access_tokens,来实现并发。在access_tokens.json中直接换行添加发现只能使用第一个

curl -X PATCH
-H "Content-Type: application/json"
-H "Authorization: TotallySecurePassword"
-d "@/root/access_tokens.json"
http://127.0.0.1:10080/admin/tokens

commented

请问是在access_tokens.json里面放多个tokens吗,具体格式是怎么样的,我尝试了几种格式但是尝试并发请求时只能请求第一个账号

[
"accessToken1",
"accessToken2",
.....
]

commented

感谢

[ "accessToken1", "accessToken2", ..... ]

commented

[ "accessToken1", "accessToken2", ..... ]

想再问一个问题,如果要自定义api key的话,看之前的issuse说要自定义api_keys.txt文件,但是如何自定义呢?

in api_keys.txt:

apikey1
apikey2
...
commented

in api_keys.txt:

apikey1
apikey2
...

api_keys.txt需要放在哪里?是在根目录下自己打包镜像,还是修改docker-compose 映射进去(不知道目录是什么),感谢作者大大

commented

in api_keys.txt:

apikey1
apikey2
...

api_keys.txt需要放在哪里?是在根目录下自己打包镜像,还是修改docker-compose 映射进去(不知道目录是什么),感谢作者大大

同问,解决了吗