Giter Club home page Giter Club logo

mbagpt's Introduction

MBAGPT: Chatting with Multiple Data Sources

MBAGPT is a chat application that leverages the power of GPT-3.5-turbo to provide conversational responses with access to multiple data sources. It allows users to ask questions and receive answers from different knowledge bases (vectorDBs), such as Alex Hormozi, Warren Buffett and Richard Branson as well as answer general queries with the ChatGPT API as a fallback.

Features

  • Chat interface for interacting with the chatbot powered by GPT-3.5-turbo.
  • Integration with Hormozi, Buffett and Branson databases for retrieving relevant documents.
  • Semantic search functionality to provide informative snippets from the databases.
  • Intent classification to route user queries to the appropriate database.
  • HTML templates for displaying chat history and messages.
  • Persistence of embeddings using the Chroma vector store.
  • OpenAI API key integration for authentication.

Installation

  1. Clone the repository:
git clone https://github.com/wombyz/MBAGPT.git
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Set up your credentials:
  • Sign up on the OpenAI website and obtain an API key.
  • Create a new file called "secrets.toml" in the .streamlit folder.
  • Set your OpenAI API key (required) and pinecone creds (optional) in the secrets.toml file or as an environment variable.
  • Update the code in the app to use the correct method for accessing the API key.
  1. Run the indexing script to create the vector databases:
python indexing.py

This script will create the Buffet and Branson vector databases by indexing the documents. Make sure to have the necessary PDF documents in the appropriate directories (./docs/buffett/ and ./docs/branson/) before running the script.

  1. Run the application:
streamlit run app.py

Usage

  1. Access the application by navigating to http://localhost:8501 in your web browser.

  2. Enter your prompt in the input box and press Enter.

  3. The chatbot will process your prompt and provide a response based on the available data sources.

  4. The chat history will be displayed on the screen, showing both user and assistant messages.

Contributing

Contributions are welcome! If you would like to contribute to this project, please follow these steps:

  1. Fork the repository.

  2. Create a new branch for your feature or bug fix.

  3. Implement your changes and ensure that the code passes all tests.

  4. Submit a pull request with a detailed description of your changes.

License

This project is licensed under the MIT License.

mbagpt's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mbagpt's Issues

Failed to build tiktoken ERROR: Could not build wheels ...

Log :

Building wheels for collected packages: tiktoken
  Building wheel for tiktoken (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for tiktoken (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [38 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-312
      creating build\lib.win-amd64-cpython-312\tiktoken
      copying tiktoken\core.py -> build\lib.win-amd64-cpython-312\tiktoken
      copying tiktoken\load.py -> build\lib.win-amd64-cpython-312\tiktoken
      copying tiktoken\model.py -> build\lib.win-amd64-cpython-312\tiktoken
      copying tiktoken\registry.py -> build\lib.win-amd64-cpython-312\tiktoken
      copying tiktoken\_educational.py -> build\lib.win-amd64-cpython-312\tiktoken
      copying tiktoken\__init__.py -> build\lib.win-amd64-cpython-312\tiktoken
      creating build\lib.win-amd64-cpython-312\tiktoken_ext
      copying tiktoken_ext\openai_public.py -> build\lib.win-amd64-cpython-312\tiktoken_ext
      running egg_info
      writing tiktoken.egg-info\PKG-INFO
chain.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for tiktoken
Failed to build tiktoken
ERROR: Could not build wheels for tiktoken, which is required to install pyproject.toml-based projects

Solution :

Install a Rust Compiler: You can install Rust on your system. The recommended way to do this is through rustup, which is a toolchain installer for Rust. Once Rust is installed, you should be able to build the tiktoken package. Make sure the Rust compiler (rustc) is in your system's PATH.

Problems with **Python 3.11** it didn't support **Chromadb**, so this one requires **numpy <1.24** and this is no compatible with Python 3.11

Problems with Python 3.11 it didn't support Chromadb, so this one requires numpy <1.24 and this is no compatible with Python 3.11

Assuming I have no Python installed and, of course, any library. Is there any way to recreate a clean install of the repository and all the required libraries needed

When I try to run python indexing.py, get a lot of errors, like:

  1. Need to install (to chromadb/hnswlib, see below): Microsoft C++ Build Tools, see how in https://github.com/bycloudai/InstallVSBuildToolsWindows
  2. Need, also:
  • tabulate
  • unstructured
  • pdf2image
  • hnswlib
  • chromadb

The last 2 ones cannot install on my computer due to the commented incompatibility, so not sure if I need any another lib.

So finally I cannot test this great app :-(

Thanks in advance

Julio Falcón

Error with setting up secrets.toml file

Hi, I am having trouble when running the following instructions under step 3

  • Create a new file called "secrets.toml" in the .streamlit folder.
  • Set your OpenAI API key (required) and pinecone creds (optional) in the secrets.toml file or as an environment variable.
  • Update the code in the app to use the correct method for accessing the API key.

Could you please help with

  1. Sharing an example of how the "secrets.toml" file should be set up or how it should look like?
  2. Sharing an example of how does the modified code looks (to use the correct method for accessing the API key) for both (a) index.py and (b) app.py?

Thank you very much!

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.