xqdoo00o / ChatGPT-to-API

Scalable unofficial ChatGPT API for production.
648 stars 129 forks source link

希望能添加teams的支持 #27

Closed AnanasJin closed 4 months ago

AnanasJin commented 7 months ago

teams和personal是通过请求标头上的 Chatgpt-Account-Id: d9355b35-5d25-4d17-84bc-xxxxxxxxxxxx 来识别身份。 这个Chatgpt-Account-Id是在GET https://chat.openai.com/backend-api/accounts/check/v4-2023-04-27 中获取的。 最后建议对账号轮询添加权重,因为plus和team的可用额度不一致。

xqdoo00o commented 4 months ago

需要轮询 增加teams账户的personal account嘛,还是 只需要team workspace account?

xqdoo00o commented 4 months ago

不过我发现,如果账号加入teams,即使原本账号没plus,也可以使用personal account发送gpt-4请求。所以添加Chatgpt-Account-Id:有什么意义呢

bi1101 commented 4 months ago

The Team allow workspace additional 100 message/3 hour limit apart from the Personal workspace. Meaning 40 + 100/ 3 h from both workspaces

I think we should treat 2 workspaces like 2 accounts when pulling the access token, optionally adding weights to the Team Workspaces to prioritize it.

xqdoo00o commented 4 months ago

Done. accounts.txt example (a@a.com is normal account, b@b.com is teams account, c@c.com is plus account)

a@a.com:password:3
b@b.com:password:2/5
c@c.com:password

the number after second : is use times of the account, default and minimal times is 1. check the above example first 3 request use account a next 5 request use account b with team workspace next 2 request use account b with personal account next 1 request use account c that's the pooling mode.

bi1101 commented 4 months ago

Wow! Thanks a lot!