Skip to content

tallamohan/tera_crystalball

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Teradata Crystal Ball

This project aims to create SQL queries from natural language. This sample proof of concept (POC) is centered around tables that exist in the database of the logged-in user within the provided instance. It employs the OpenAI gpt-3.5-turbo language model to generate SQL queries based on human input. The process involves using the "show table" statement to retrieve the table structure, which is then utilized to construct prompts for the language model. The model generates SQL query statements, which are subsequently submitted to Teradata for execution. The results are then displayed as output.

Here are the steps for executing the project:

  1. Clone the project using the command "git clone".
  2. cd tera_crystalball
  3. create .evn file with below environment variables and modify values with relavent information.
    1. TERADATA_HOST=whomooz;
    2. TERADATA_USER=guest;
    3. TERADATA_PASSWORD=please;
    4. USER_QUERY=query.
    5. AZURE_OPENAI_ENDPOINT=azureendpointurl
    6. AZURE_OPENAI_API_KEY=azurere openai key
    7. AZURE_OPENAI_MODEL=modelname to use
  4. Run pip install -r requirements_dev.txt
  5. Run python main.py

About

tera_crystalball

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published