This article is a simple quick starter (what I did was) with SqlDatabaseChain.
Hope this ignites some interest.
Many thanks to:
sqlalchemy-iris author @Dmitry Konnov Maslennikov
Your project made this possible today.
The article script uses openai API so caution not to share table information and records externally, that you didn't intend to.
A local model could be plugged in , instead if needed.
Creating a new virtual environment
mkdir chainsql cd chainsql python -m venv . scripts\activate pip install langchain pip install wget # Need to connect to IRIS so installing a fresh python driver python -c "import wget;url='https://raw.githubusercontent.com/intersystems-community/iris-driver-distribution/main/DB-API/intersystems_irispython-3.2.0-py3-none-any.whl';wget.download(url)" # And for more magic pip install sqlalchemy-iris pip install openai set OPENAI_API_KEY=[ Your OpenAI Key ] python
.png)
.png)
.png)

