From 411bdfda85546d69666c16faa4bbdbfa8c8c05ef Mon Sep 17 00:00:00 2001 From: rogersun Date: Fri, 26 Jun 2026 12:22:51 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4json=E5=A4=84=E7=90=86?= =?UTF-8?q?=E6=96=B9=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ai/utils/show_prompt.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ai/utils/show_prompt.py b/ai/utils/show_prompt.py index 025b2a8..356c130 100644 --- a/ai/utils/show_prompt.py +++ b/ai/utils/show_prompt.py @@ -144,4 +144,7 @@ class ShowAI: ) # print(dict(response)) # print(response.choices[0].message.content) - return response.choices[0].message.content.model_dump_json(), response.model_dump_json(), response.usage.model_dump_json() + res_json = response.model_dump_json() + res_obj = json.loads(res_json) + print(res_obj) + return res_obj['choices'][0]['.message']['content'], res_json, response.usage.model_dump_json()