You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can support version 2 of SQLAlchemy by creating a custom SQLAlchemyCache child class to customize the schema used for caching. To support high-speed fulltext prompt indexing with Postgres, you can use the code example provided in the issue.
You can also use SQLAlchemyCache to cache with any SQL database supported by SQLAlchemy. For example, you can use the example Chinook database to set up an LLM to answer questions over a database. To do this, follow the instructions on https://database.guide/2-sample-databases-sqlite/, placing the .db file in a notebooks folder at the root of this repository.
Note: For data-sensitive projects, you can specify return_direct=True in the SQLDatabaseChain initialization to directly return the output of the SQL query without any additional formatting. This prevents the LLM from seeing any contents within the database. Note, however, the LLM still has access to the database scheme (i.e. dialect, table and key names) by default.
I hope this helps! Let me know if you have any further questions.
I would like to support version 2 of SQLAlchemy.
The text was updated successfully, but these errors were encountered: