update
This commit is contained in:
@@ -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="这段时间内的详细数据,每周或每月的数据。",
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user