Skip to content
New issue

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

Improve SQL module #526

Merged
merged 43 commits into from
Nov 9, 2023
Merged

Improve SQL module #526

merged 43 commits into from
Nov 9, 2023

Conversation

gerson24
Copy link
Contributor

@gerson24 gerson24 commented Nov 9, 2023

This PR closes #500 and proposes significant enhancements to the SQL module, including the ability to execute SQL queries and generate responses in a tabular format.
The changes made are as follows:

  • A tabular data model consisting of columns and rows has been defined, allowing the generic representation of SQL query results.
  • The module now interacts with the database using Exposed to obtain the schema data from the table names provided by the user. This eliminates the need to include the table schema information in the context.
  • A function has been implemented that from a prompt, the table names and a context, returns a response with the queries and the resulting data. It also supports prompts about information about tables, about what questions you can ask or anything related to SQL.
  • Code example have been included.

Documentation: xebia-functional/xef-website#24

Copy link
Contributor

@raulraja raulraja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @gerson24 @tomascayuelas , thank you!

Copy link
Contributor

@rafaparadela rafaparadela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. Thanks

@gerson24 gerson24 merged commit 5d4eef1 into main Nov 9, 2023
5 checks passed
@gerson24 gerson24 deleted the feature/sql-new-approach branch November 9, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve the SQL module
4 participants