|
|
|
@ -251,6 +251,8 @@ class ShowAI: |
|
|
|
# self.general_prompt() |
|
|
|
# self.general_prompt() |
|
|
|
# 与AI开始对话 |
|
|
|
# 与AI开始对话 |
|
|
|
print(f"与{self.ai_model_name}开始对话") |
|
|
|
print(f"与{self.ai_model_name}开始对话") |
|
|
|
|
|
|
|
ts = str(int(datetime.datetime.timestamp(datetime.datetime.now()))) |
|
|
|
|
|
|
|
user_id = f"{self.cinema.zz_code}-{ts}" if get_runtime_val('deepseek_cache') == 0 else self.cinema.zz_code |
|
|
|
response = self.client.chat.completions.create( |
|
|
|
response = self.client.chat.completions.create( |
|
|
|
model=self.ai_model_name, |
|
|
|
model=self.ai_model_name, |
|
|
|
messages=[ |
|
|
|
messages=[ |
|
|
|
@ -261,7 +263,7 @@ class ShowAI: |
|
|
|
stream=False, |
|
|
|
stream=False, |
|
|
|
reasoning_effort="high", |
|
|
|
reasoning_effort="high", |
|
|
|
extra_body={"thinking": {"type": "enabled"}, |
|
|
|
extra_body={"thinking": {"type": "enabled"}, |
|
|
|
"user_id": self.cinema.zz_code}, |
|
|
|
"user_id": user_id}, |
|
|
|
response_format={ |
|
|
|
response_format={ |
|
|
|
'type': 'json_object' |
|
|
|
'type': 'json_object' |
|
|
|
} |
|
|
|
} |
|
|
|
|