From 83177a34169eebf4683ba1122e3ca482ff5a42ac Mon Sep 17 00:00:00 2001 From: RockChinQ <1010553892@qq.com> Date: Fri, 12 Jan 2024 10:09:53 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=A7=BB=E9=99=A4=E5=BC=83=E7=94=A8?= =?UTF-8?q?=E7=9A=84=20credit.py=20=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/utils/credit.py | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 pkg/utils/credit.py diff --git a/pkg/utils/credit.py b/pkg/utils/credit.py deleted file mode 100644 index e09c74ee..00000000 --- a/pkg/utils/credit.py +++ /dev/null @@ -1,19 +0,0 @@ -# OpenAI账号免费额度剩余查询 -import requests - -def fetch_credit_data(api_key: str, http_proxy: str) -> dict: - """OpenAI账号免费额度剩余查询""" - proxies = { - "http":http_proxy, - "https":http_proxy - } if http_proxy is not None else None - - resp = requests.get( - url="https://api.openai.com/dashboard/billing/credit_grants", - headers={ - "Authorization": "Bearer {}".format(api_key), - }, - proxies=proxies - ) - - return resp.json() \ No newline at end of file