feat: support balance query for CloseAI (#240)

* 增加CloseAI余额查询功能

* 去除debug代码

* fix: bug fix

* docs: update README

---------

Co-authored-by: sudongyang <sudongyang@xiaomi.com>
Co-authored-by: JustSong <songquanpeng@foxmail.com>
This commit is contained in:
Cross Fire
2023-07-03 20:43:42 +08:00
committed by GitHub
parent 04f40def2f
commit d383302e8a
4 changed files with 46 additions and 14 deletions

View File

@@ -30,6 +30,9 @@ function renderType(type) {
function renderBalance(type, balance) {
switch (type) {
case 1: // OpenAI
return <span>${balance.toFixed(2)}</span>;
case 4: // CloseAI
return <span>¥{balance.toFixed(2)}</span>;
case 8: // 自定义
return <span>${balance.toFixed(2)}</span>;
case 5: // OpenAI-SB