https://github.com/avisionh/sqlgpt
Translating natural language into a query and then executing it on a database
https://github.com/avisionh/sqlgpt
chatgpt langchain ollama sql
Last synced: 2 months ago
JSON representation
Translating natural language into a query and then executing it on a database
- Host: GitHub
- URL: https://github.com/avisionh/sqlgpt
- Owner: avisionh
- License: mit
- Created: 2024-01-27T23:47:47.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-08T13:24:52.000Z (11 months ago)
- Last Synced: 2025-01-27T08:16:00.724Z (4 months ago)
- Topics: chatgpt, langchain, ollama, sql
- Language: Python
- Homepage:
- Size: 140 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sqlgpt
Translating natural language into a query and then executing this in a database.## Getting started
Download Ollama from the official website [here](https://ollama.com/download).In your terminal, download Llama 3 via `ollama pull llama3` (takes ~30 mins to download).
Create a service account key for the project in GCP that you want to access [here](https://cloud.google.com/iam/docs/keys-create-delete). Then store this in as `profiles/gcp_service_account_key.json`.
Now set-up the project by running the following:
```commandline
make setup-local
```## Interacting with chatbot
To ask the Llama3 a question about your data, run the following in your terminal:
```commandline
poetry run streamlit run app.py
```## Docker
To build the Docker container and image for this, run the below:
```commandline
docker-compose up
```
When not in use, run:
```commandline
docker-compose down
```You can inspect the actual container via:
```commandline
docker container list
# find the ID of your docker container
docker exec -it bash
```