Database connection management and SQL execution feature #2709

Closed
opened 2025-11-11 15:12:48 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @sm750s on GitHub (Nov 20, 2024).

I would like to request a feature in OpenWebUI that enables the execution of SQL queries provided as responses from the Assistant. OpenWebUI has already added the ability to execute Python code and render HTML, and adding SQL execution capability would further enhance its usability.

To implement this, the following features seem necessary:

  • Database Connection Management: Administrators should be able to manage database connections within OpenWebUI. Additionally, each model should specify which database connection to use when executing SQL.
  • SQL Execution: If an Assistant response contains SQL code in a code block, users should be able to click "Run Code." The backend will then use the database connection linked to the model to execute the SQL query. The query results should be displayed as a Markdown table on the screen. (It might also be necessary to manage settings like the maximum number of rows returned.)

I hope this fantastic feature will be made available in OpenWebUI soon.

Originally created by @sm750s on GitHub (Nov 20, 2024). I would like to request a feature in OpenWebUI that enables the execution of SQL queries provided as responses from the Assistant. OpenWebUI has already added the ability to execute Python code and render HTML, and adding SQL execution capability would further enhance its usability. To implement this, the following features seem necessary: - **Database Connection Management**: Administrators should be able to manage database connections within OpenWebUI. Additionally, each model should specify which database connection to use when executing SQL. - **SQL Execution**: If an Assistant response contains SQL code in a code block, users should be able to click "Run Code." The backend will then use the database connection linked to the model to execute the SQL query. The query results should be displayed as a Markdown table on the screen. (It might also be necessary to manage settings like the maximum number of rows returned.) I hope this fantastic feature will be made available in OpenWebUI soon.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#2709