fix
This commit is contained in:
@@ -173,7 +173,7 @@ def stream_ai_response(client, system_prompt, user_prompt, on_complete=None):
|
|||||||
{"role": "user", "content": user_prompt},
|
{"role": "user", "content": user_prompt},
|
||||||
],
|
],
|
||||||
stream=True,
|
stream=True,
|
||||||
extra_body={"thinking": False},
|
extra_body={"thinking": {"type": "disabled"}},
|
||||||
)
|
)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
yield f"data: {json.dumps({'type': 'error', 'message': str(exc)})}\n\n"
|
yield f"data: {json.dumps({'type': 'error', 'message': str(exc)})}\n\n"
|
||||||
@@ -643,7 +643,7 @@ class AILoginSummaryAPI(APIView):
|
|||||||
{"role": "system", "content": system_prompt},
|
{"role": "system", "content": system_prompt},
|
||||||
{"role": "user", "content": user_prompt},
|
{"role": "user", "content": user_prompt},
|
||||||
],
|
],
|
||||||
extra_body={"thinking": False},
|
extra_body={"thinking": {"type": "disabled"}},
|
||||||
)
|
)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
return "", str(exc)
|
return "", str(exc)
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ def evaluate_flowchart_task(submission_id):
|
|||||||
{"role": "user", "content": user_prompt}
|
{"role": "user", "content": user_prompt}
|
||||||
],
|
],
|
||||||
temperature=0.3,
|
temperature=0.3,
|
||||||
extra_body={"thinking": False},
|
extra_body={"thinking": {"type": "disabled"}},
|
||||||
)
|
)
|
||||||
|
|
||||||
ai_response = response.choices[0].message.content
|
ai_response = response.choices[0].message.content
|
||||||
|
|||||||
Reference in New Issue
Block a user