From bea8d2db1ca277b5bd1c76edfeabe025faa5c9d3 Mon Sep 17 00:00:00 2001 From: rogersun Date: Fri, 26 Jun 2026 12:03:50 +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_process.py | 2 +- ai/utils/show_prompt.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ai/utils/show_process.py b/ai/utils/show_process.py index 7fdf8bf..d60ee1f 100644 --- a/ai/utils/show_process.py +++ b/ai/utils/show_process.py @@ -41,7 +41,7 @@ def show_main_process(zz_code=None, day_delta=3): print('message:', message) print('tokens:', tokens) # 获取排片数据 - result_obj = json.loads(result) + result_obj = result # 预测排片数据 _show = result_obj['show'].replace('```', '').replace('csv', '').strip() # 预测销售数据 diff --git a/ai/utils/show_prompt.py b/ai/utils/show_prompt.py index 70a2579..025b2a8 100644 --- a/ai/utils/show_prompt.py +++ b/ai/utils/show_prompt.py @@ -144,4 +144,4 @@ class ShowAI: ) # print(dict(response)) # print(response.choices[0].message.content) - return response.choices[0].message.content, response.model_dump_json(), response.usage.model_dump_json() + return response.choices[0].message.content.model_dump_json(), response.model_dump_json(), response.usage.model_dump_json()