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

Make number of returned rows for text2sql configurable by user #9339

Open
dusvyat opened this issue Jun 13, 2024 · 1 comment
Open

Make number of returned rows for text2sql configurable by user #9339

dusvyat opened this issue Jun 13, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@dusvyat
Copy link
Contributor

dusvyat commented Jun 13, 2024

Short description and motivation for the proposed feature

Coming from user in slack community thread

Currently, number of returned rows is set to 30 see here

We should make this configurable by the user.

Video or screenshots

No response

Describe some possible solutions

No response

Anything else?

No response

@dusvyat dusvyat added the enhancement New feature or request label Jun 13, 2024
@jSchenkel
Copy link

Hello! I'm currently developing an AI tool that investigates issues, and I used this issue as a test to see if it could help. Below are the findings, which I hope might assist in resolving this issue faster.

Boosterbot.ai Findings:

The investigation identified that the number of rows is hardcoded to 30 in the sql_agent.py file. To make this configurable, a new configuration option should be added to the Config class in the config.py file. The SQLAgent class should be updated to use this new configuration parameter. Additionally, the API endpoints and GUI should be updated to allow users to set this new configuration option. Documentation should also be updated to reflect this change.

  1. Locate the current implementation where the number of returned rows is hardcoded to 30.
    In the sql_agent.py file, the number of rows is hardcoded to 30. This is likely within a method that retrieves or processes SQL query results. The hardcoded value needs to be replaced with a configurable parameter.
  2. Modify the code to replace the hardcoded value with a configurable parameter. This will likely involve adding a new configuration option and updating the relevant parts of the code to use this new parameter.
    In the config.py file, a new configuration option should be added to the Config class to allow users to specify the number of rows. The sql_agent.py file should be updated to use this new configuration parameter. Specifically, the hardcoded value of 30 should be replaced with a reference to the new configuration parameter.
  3. Ensure that the new configuration option is accessible to the user. This may involve updating the user interface or API to allow users to specify the number of rows they want to retrieve. Additionally, update any relevant documentation to reflect this new option.
    In the config.py file in the api/http/namespaces directory, the API endpoints should be updated to allow users to set the new configuration option. The gui.py file should be checked to ensure that the GUI provides a way for users to specify the number of rows. Documentation should be updated to reflect the new configuration option.

These suggestions are automatically generated based on the context of the issue description and repository code. If you have any feedback or want to try it on your own project, my email is on my profile. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants