fix:kunlun deepseek

This commit is contained in:
gongwenxin
2025-08-13 10:20:15 +08:00
parent 2aa94b6e83
commit ed77da19b6
3 changed files with 920633 additions and 1 deletions
+1
View File
@@ -9,6 +9,7 @@ class LLMService:
if tools is None:
tools = []
self.api_key = os.getenv("OPENAI_API_KEY")
# self.api_key = "sk-lbGrsUPL1iby86h554FaE536C343435dAa9bA65967A840B2"
if not self.api_key:
raise ValueError("API key not found. Please set the OPENAI_API_KEY environment variable.")
@@ -85,7 +85,7 @@ class LLMService:
logger.debug(f"LLM API Request Payload:\n{json.dumps(payload, indent=2, ensure_ascii=False)}")
try:
response = requests.post(f"{self.base_url}/chat/completions", headers=self.headers, json=payload, timeout=60)
response = requests.post(f"{self.base_url}/chat/completions", headers=self.headers, json=payload, timeout=60,verify=False)
response.raise_for_status() # 如果HTTP状态码表示错误,则抛出异常
response_data = response.json()
+920631
View File
File diff suppressed because one or more lines are too long