snowflakeGPT
snowflakeGPT copied to clipboard
A Snowflake GPT Demo using SqlAlchemy
❄️ Snowflake GPT Agent: GPT for Running Snowflake Query - Demo

Powered by langchain, GPT4All and inspired by privategpt
💾 Installation
-
Navigate to the directory where the repository was downloaded
cd snowflakegpt -
Install the required dependencies
pip install -r requirements.txt -
Configure OpenAI Key
- If Using OpenAI key, simply
export OPENAI_API_KEY=***** - If want to use config file, rename
config_template.ini->config.inifile inside thesnowdflakegptdir & update either Azure or OpenAI config
By completing these steps, you have properly configured the API Keys for your project.
- If Using OpenAI key, simply
Pick the Model
Add the model details in config.ini
[model]
MODEL_TYPE=azure/openai/LlamaCpp/GPT4All #supports LlamaCpp or GPT4All as well
LLAMA_EMBEDDINGS_MODEL=/path/to/ggml-model-q4_0.bin #Path to your GPT4All or LlamaCpp supported LLM
MODEL_PATH=/path/to/ggml-gpt4all-j-v1.3-groovy.bin #Path to your LlamaCpp supported embeddings model
Uploading Data in Vector Database
- Run docker compose up
- Run
python -m snowgpt upload
🔧 Usage
- Run
snowdflakegptPython module in your terminal with default GPT model
python -m snowgpt "What is the population of India?"
- Run the agent by passing specific model.
python -m snowgpt "How many women between the ages 39 and 45 in India" gpt-4_8k_ascent
Current supported list of deployment names are
- gpt-35-turbo
- gpt-4_8k_ascent
- gpt-4_32k_ascent
Default is gpt-35-turbo
🚒 Improvements / TODO
LLM Chains
Maybe a sequential chain to have an intermediate function to validate the query and make corrections
Custom Agent
Creating a Custom Agent to control the query generation. This may need a custom Agent & custom Tools .