Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aysenurcftc/langchainsqlagent
This project enables performing SQL queries in natural language using LangChain and Streamlit.
https://github.com/aysenurcftc/langchainsqlagent
faiss-vector-database langchain postgresql sql-agent streamlit
Last synced: about 2 months ago
JSON representation
This project enables performing SQL queries in natural language using LangChain and Streamlit.
- Host: GitHub
- URL: https://github.com/aysenurcftc/langchainsqlagent
- Owner: aysenurcftc
- License: mit
- Created: 2024-10-22T16:02:28.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-11-25T14:17:01.000Z (3 months ago)
- Last Synced: 2024-12-14T09:43:30.787Z (about 2 months ago)
- Topics: faiss-vector-database, langchain, postgresql, sql-agent, streamlit
- Language: Python
- Homepage:
- Size: 184 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LangChain SQL Agent
![agent_sql](https://github.com/aysenurcftc/LangChainSQLAgent/blob/main/sql_agent.png)
This project is a system that connects to a PostgreSQL database and runs AI-powered SQL queries. It uses LangChain and FAISS to convert database content into vector format and generate SQL queries based on natural language questions. This makes data retrieval from the database faster and more accurate. The project also features a user-friendly interface with Streamlit.
![agen](https://github.com/aysenurcftc/LangChainSQLAgent/blob/main/agent.png)
## Environment Variables
`OPENAI_API_KEY=`
`LANGCHAIN_API_KEY=`
`DB_USER=`
`DB_PASSWORD=`
`DB_HOST=`
`DB_PORT=`
`DB_NAME=`
## Run Locally
Clone the project
```bash
git clone https://github.com/aysenurcftc/LangChainSQLAgent.git
```Go to the project directory
```bash
cd LangChainSQLAgent
```Install dependencies
```bash
pipenv install
```Start the project
```bash
streamlit run python main.py```