run-llama / llama-hub

A library of data loaders for LLMs made by the community -- to be used with LlamaIndex and/or LangChain
https://llamahub.ai/
MIT License
3.44k stars 729 forks source link

Added fix to run SQL query function description #729

Closed wangdatan closed 9 months ago

wangdatan commented 9 months ago

Description

This change fixed an isseu which the run SQL function cannot correctly summarize the result. In addition to that, this includes a few refactorings to reuse code. And Fixed verbose logic, which correctly shows dataframe when run query with verbose=True

Type of Change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Suggested Checklist:

review-notebook-app[bot] commented 9 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

wangdatan commented 9 months ago

@jerryjliu , I just updated the comments of the try_display method to make it less confusing. And I also updated the notebook, which includes the data frame output (tables) to make it easier to understand. And added a notebook block (see the last notebook) to do chat('run it') to make sure a query can be executed based on the context.

jerryjliu commented 9 months ago

great! i think there's jsut a quick lint error. if you dont' have time to get to this i can do it in a few hours

wangdatan commented 9 months ago

Oh, saw it, let me fix it very quickly!

wangdatan commented 9 months ago

It is now fixed, @jerryjliu

jerryjliu commented 9 months ago

oops merged now