We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
功能描述 / Feature Description 基于xf 部署的qwen2.5-instruct-7b 使用 数据库对话 功能时报错 看报错是因为 执行的sql语句是md格式(前缀有 ```sql 后缀有``` ) 不清楚是qwen系列的问题还是别的也有 没测
解决的问题 / Problem Solved 通过一个监听来规范sql语句 通过提示词规范sql语句生成
实现建议 / Implementation Suggestions 监听
def detect_sql(conn, cursor, statement, parameters, context, executemany): sql = statement.lower() if sql.startswith("```sql"): statement = statement[6:].strip() if sql.endswith("```"): statement = statement[:-3].strip() statement = statement.replace("\n", " ") # print("SQL Statement:", statement) return statement, parameters
event.listen(db._engine, "before_cursor_execute", detect_sql, retval=True )
替代方案 / Alternative Solutions 通过提示词让AI自检 但是没成功
The text was updated successfully, but these errors were encountered:
我也是qwen生成的sql有问题
Sorry, something went wrong.
No branches or pull requests
功能描述 / Feature Description
基于xf 部署的qwen2.5-instruct-7b 使用 数据库对话 功能时报错
看报错是因为 执行的sql语句是md格式(前缀有 ```sql 后缀有``` )
不清楚是qwen系列的问题还是别的也有 没测
解决的问题 / Problem Solved
通过一个监听来规范sql语句
通过提示词规范sql语句生成
实现建议 / Implementation Suggestions
监听
替代方案 / Alternative Solutions
通过提示词让AI自检 但是没成功
The text was updated successfully, but these errors were encountered: