mirror of
https://github.com/langgenius/dify-plugins.git
synced 2026-07-22 01:55:36 -04:00
DataBase Error #5
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zhtwh on GitHub (Mar 7, 2025).
参数传递中,SQL Excute 接受了大模型的所有字符,导致运行失败。
应传输的text:
SELECT 商品名称, SUM(下单量) AS 总下单量 FROM pop_mc GROUP BY 商品名称 ORDER BY 总下单量 DESC LIMIT 10;
实际接受到的text:
sql SELECT 商品名称, SUM(下单量) AS 总下单量 FROM pop_mc GROUP BY 商品名称 ORDER BY 总下单量 DESC LIMIT 10;报错信息如下:
Error: (pymysql.err.ProgrammingError) (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sql\nselect 商品名称, sum(下单量) as 总下单量\nfrom pop_mc\ngroup by ' at line 1") [SQL: sql
select 商品名称, sum(下单量) as 总下单量
from pop_mc
group by 商品名称
order by 总下单量 desc
limit 10;
(Background on this error at: https://sqlalche.me/e/20/f405)
@alterxyz commented on GitHub (Mar 10, 2025):
@hjlarry
@hjlarry commented on GitHub (Mar 10, 2025):
Try using the correct prompt, such as "only provide executable SQL queries," or consider switching to a different LLM.
@zhtwh commented on GitHub (Mar 10, 2025):
@hjlarry commented on GitHub (Mar 10, 2025):
I'm unable to replicate it.
@zhtwh commented on GitHub (Mar 10, 2025):
Something different ,text output