From a12a665fde6837f597c432d63655ce0e61659635 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Wed, 18 Mar 2026 13:26:32 +0800 Subject: [PATCH] update --- ai/views/oj.py | 6 +++--- flowchart/tasks.py | 4 ++-- problem/views/admin.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ai/views/oj.py b/ai/views/oj.py index f560b5b..60f7666 100644 --- a/ai/views/oj.py +++ b/ai/views/oj.py @@ -156,7 +156,7 @@ def stream_ai_response(client, system_prompt, user_prompt, on_complete=None): """SSE 流式响应生成器,on_complete(full_text) 在流结束时调用""" try: stream = client.chat.completions.create( - model="deepseek-chat", + model="deepseek-reasoner", messages=[ {"role": "system", "content": system_prompt}, {"role": "user", "content": user_prompt}, @@ -575,7 +575,7 @@ class AILoginSummaryAPI(APIView): try: completion = client.chat.completions.create( - model="deepseek-chat", + model="deepseek-reasoner", messages=[ {"role": "system", "content": system_prompt}, {"role": "user", "content": user_prompt}, @@ -605,7 +605,7 @@ class AIAnalysisAPI(APIView): AIAnalysis.objects.create( user=request.user, provider="deepseek", - model="deepseek-chat", + model="deepseek-reasoner", data={"details": details, "duration": duration}, system_prompt=system_prompt, user_prompt="这段时间内的详细数据,每周或每月的数据。", diff --git a/flowchart/tasks.py b/flowchart/tasks.py index faf5346..4f0b7c4 100644 --- a/flowchart/tasks.py +++ b/flowchart/tasks.py @@ -52,7 +52,7 @@ def evaluate_flowchart_task(submission_id): client = get_ai_client() response = client.chat.completions.create( - model="deepseek-chat", + model="deepseek-reasoner", messages=[ {"role": "system", "content": system_prompt}, {"role": "user", "content": user_prompt} @@ -73,7 +73,7 @@ def evaluate_flowchart_task(submission_id): submission.ai_suggestions = score_data.get('suggestions', '') submission.ai_criteria_details = score_data.get('criteria_details', {}) submission.ai_provider = 'deepseek' - submission.ai_model = 'deepseek-chat' + submission.ai_model = 'deepseek-reasoner' submission.processing_time = processing_time submission.status = FlowchartSubmissionStatus.COMPLETED submission.evaluation_time = timezone.now() diff --git a/problem/views/admin.py b/problem/views/admin.py index 401fa35..17b3d74 100644 --- a/problem/views/admin.py +++ b/problem/views/admin.py @@ -495,7 +495,7 @@ class ProblemFlowchartAIGen(APIView): python_code = request.data.get("python", "") client = get_ai_client() response = client.chat.completions.create( - model="deepseek-chat", + model="deepseek-reasoner", messages=[ { "role": "system",