Giter Club home page Giter Club logo

chatdb's Introduction

ChatDB Streamlit App

A web app built with Streamlit that allows you to chat with your databases using a GPT model.

Features

  • Chat with your GPT model of choice

  • Ask about anything in your databases, and the bot will answer

    Expand...
  • View the results and the SQL queries that the GPT model generated

    • SQL queries are added below the bot's response

      Expand...
    • Expand the box to see the query and the result the bot received

      Expand...
    • If the model accidentally generates an invalid query or the query fails, the error will be displayed (example: apartments table is not in the database)

      Expand...
    • GPT 3.5 turbo (the default model) is really good at generating complex SQL queries from your questions, so just ask away!

      Expand...
  • Locally backup and restore your conversations and settings (API keys are encrypted before backup)

    Expand...

Demo

Chatdb.Demo.mp4

Getting started

  • Open the Streamlit app in your browser: Streamlit App
  • Go to the โš™๏ธ Settings page
  • Provide your OpenAI API key and add some database connnections
  • Go to the ๐Ÿค– Chats page
  • Create a new conversation by specifying the GPT model and selecting the databases you added
  • Start chatting ๐Ÿ—ฃ โ†”๏ธ ๐Ÿค–

Compatibility

Currently supported databases:

  • PostgreSQL (using psycopg2)
  • MySQL and MariaDB (using mysqlclient)
  • Oracle (using cx_oracle)
  • Microsoft SQL Server (using pyodbc)

If your database or DB API are not here, feel free to open a feature request. Contributions are also very welcome!

Building

If you want to build and test locally:

  • Clone the repository
  • Install requirements with pip install -r requirements.txt (recommended to use a virtual environment)
  • Launch the app with streamlit run ๐Ÿ _Home.py

Acknowledgement

This project is part of an internship I performed at B.E.A.R. TELL.

chatdb's People

Contributors

sutandotsukai181 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.