fix:kunlun deepseek
This commit is contained in:
parent
2aa94b6e83
commit
ed77da19b6
@ -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
summary(7).json
Normal file
920631
summary(7).json
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user