better:优化表达方式和侧面人格

This commit is contained in:
SengokuCola
2025-06-25 15:53:59 +08:00
parent 276a70a671
commit 5351b7639c
9 changed files with 381 additions and 250 deletions

View File

@@ -109,6 +109,7 @@ class LLMRequest:
def __init__(self, model: dict, **kwargs):
# 将大写的配置键转换为小写并从config中获取实际值
try:
# print(f"model['provider']: {model['provider']}")
self.api_key = os.environ[f"{model['provider']}_KEY"]
self.base_url = os.environ[f"{model['provider']}_BASE_URL"]
except AttributeError as e: