From 94609269a1a2212a078bc5256323967c806c3739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B2=E9=B8=BF=E5=AE=87?= Date: Wed, 26 Feb 2025 21:18:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=86=20POST=20=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E6=A0=BC=E5=BC=8F=E4=BB=8E=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E6=95=B0=E6=8D=AE=E6=9B=B4=E6=94=B9=E4=B8=BA=20JSON?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 史鸿宇 --- apps/routers/mock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/routers/mock.py b/apps/routers/mock.py index b9f8c4779..caa5dbc16 100644 --- a/apps/routers/mock.py +++ b/apps/routers/mock.py @@ -461,7 +461,7 @@ async def call_rag(params: dict = {}): } # 发送 POST 请求 async with aiohttp.ClientSession() as session: - async with session.post(url, headers=headers, data=params_dict) as response: + async with session.post(url, headers=headers, json=params_dict) as response: # 检查响应状态码 if response.status == status.HTTP_200_OK: result = await response.json() -- Gitee