This commit is contained in:
jack
2025-12-11 18:05:20 +08:00
parent 032ed50853
commit 5731e8c8fe
24 changed files with 5458 additions and 107 deletions
+10 -7
View File
@@ -2,12 +2,8 @@
import json
import httpx
with open('config.json', 'r') as f:
config = json.load(f)
siliconflow = config['siliconflow']
token = siliconflow['api_keys']
headers = {"Authorization": f"Bearer sk-pvdiisdowmuwkrpnxsrlhxaovicqibmlljwrwwvbbdjaitdl"}
headers = {"Authorization": f"Bearer {token}"}
def get_user_info():
# 获取用户信息
@@ -30,8 +26,15 @@ def get_models_info():
data = response.json()['data']
model_list = []
for d in data:
print(d)
if d.get('object') and d.get('object') == 'model':
model_name = d.get('id')
# print(model_name)
model_list.append(model_name)
print(model_list)
# get_models_info()
# get_user_info()
get_user_info()