This commit is contained in:
jack
2026-01-08 17:30:38 +08:00
parent 0da3254831
commit 7ac1c4d161
20 changed files with 1669 additions and 95 deletions
+10 -8
View File
@@ -21,7 +21,7 @@ SILICONFLOW_API_KEY = "sk-pvdiisdowmuwkrpnxsrlhxaovicqibmlljwrwwvbbdjaitdl"
SILICONFLOW_BASE_URL = "https://api.siliconflow.cn/v1"
MODELS = [
'Pro/deepseek-ai/DeepSeek-V3.1-Terminus',
# 'deepseek-ai/DeepSeek-V3.2-Exp',
'deepseek-ai/DeepSeek-V3.2-Exp',
'Qwen/Qwen3-VL-235B-A22B-Instruct',
# 'MiniMaxAI/MiniMax-M2',
# 'zai-org/GLM-4.6',
@@ -49,6 +49,8 @@ def process_text(text):
if should_include:
results.append(tl)
results = [item for item in results if item != '"']
if results:
return list(set(results))
else:
@@ -96,10 +98,9 @@ def csvFileLoader(file_path, keys_text):
# 如果id不存在,或者想要保留第一个出现的记录
if item_id not in data_dict:
data_dict[item_id] = {
'id': item_id,
'data_set_name': row[1],
'description': row[2],
'description_cn': row[11],
'data_set_name': f"可以使用:{row[1]}",
'description': f"不可使用,仅供参考:{row[2]}",
# 'description_cn': row[11],
}
# 将字典的值转换为列表
@@ -175,11 +176,11 @@ def call_siliconflow(prompt, model):
exit(1)
def save_result(result, folder):
def save_result(result, folder, model_name):
now = datetime.now()
time_filename = now.strftime("%H%M%S")
filename = f"{time_filename}.txt"
filename = f"{model_name}_{time_filename}.txt"
filepath = os.path.join(folder, filename)
with open(filepath, 'w', encoding='utf-8') as f:
@@ -236,7 +237,8 @@ def call_ai(prompt, model):
if result:
print(f"AI回复: {result[:200]}...")
save_result(result, folder)
model_name = model.replace("/", "_")
save_result(result, folder, model_name)
used_balance = balance - get_user_info()
print(f'本次调用 api 使用额度 {used_balance}')
else: