Giter Club home page Giter Club logo

ai-postgres-database-chatbot's Introduction

πŸ€– AI Database Chatbot πŸ€“

This is an AI chatbot that is able to answer any question about the information stored in a relational database. The chatbot created is plugged into a Postgres database.

Tools πŸ“

  • Streamlit: For an interactive, user-friendly web-based interface.
  • OpenAI: The power behind the chatbot's intelligent responses.
  • Postgres: The database where all the magic data resides.

Folder Structure πŸ“‚


β”‚   .env
β”‚   .gitignore
β”‚   app.py
β”‚   README.md
β”‚   requirements.txt
β”‚
β”œβ”€β”€β”€assets
β”‚   β”‚   dark_theme.py
β”‚   β”‚   light_theme.py
β”‚   β”‚   made_by_sdw.py
β”‚   β”‚
β”‚   └───__pycache__
β”‚           ...
β”‚
β”œβ”€β”€β”€conversation_history
β”‚       ...
β”‚
└───utils
    β”‚   api_functions.py
    β”‚   chat_functions.py
    β”‚   config.py
    β”‚   database_functions.py
    β”‚   function_calling_spec.py
    β”‚   helper_functions.py
    β”‚   system_prompts.py
    β”‚
    └───__pycache__
            ...

Installation πŸ› οΈ

  1. Clone this repository.
  2. Navigate to the directory and install the necessary Python packages with pip install -r requirements.txt.
  3. Add your database credentials and OpenAI API key in the .env file.

Running the Chatbot πŸƒ

  1. After setting up, run the command:
streamlit run app.py
  1. The chatbot UI will open in your default web browser. Engage and enjoy!

How to use it

  • Ask questions - Post questions related to data stored in the database the chatbot is connected to
  • Get answers - Enjoy the structured and dynamic answers the chatbot provides
  • Save conversations - Preserve conversations into a markdown file for your future use

Contribution πŸ‘₯

Feel free to make pull requests and add your unique spin to this - insights, feedback and suggestions are also welcome too!

ai-postgres-database-chatbot's People

Contributors

sdw-online 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.