Giter Site home page Giter Site logo

harshvardhaniimi / r4ds-book-chatbot Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 12.79 MB

Simple and effective chatbot with LLMs based on information retrieval (think personal ChatGPT)

Home Page: https://hvsc1708.substack.com/p/private-chatgpt

Jupyter Notebook 99.65% Python 0.35%
langchain large-language-models python

r4ds-book-chatbot's Introduction

R4DS Book Chatbot ๐Ÿค–๐Ÿ’ฌ

This is a super-simple-but-effective chatbot based on the concept of information retrieval. You can have a full-fledged chat interface with it in your terminal.

How it Works ๐Ÿค”

This chatbot loads up files from a documents folder. You can toss in text files, doc files, PDFs, PPTs, and pretty much anything textual. (You might need to install extra dependencies.) It then converts the contents into embeddings and stores them in a txt_docsearch folder for quick and easy use.

See ๐Ÿ” Private ChatGPT for how this chatbot works. Also see ๐Ÿฆฃ Fine-tuning Large Language Models to understand how LLM fine-tuning works.

Training Data ๐Ÿ“š

We're currently using the "R For Data Science 2E" book as the training material. But the beauty of it is, you can plug in any text material you'd like!

Prerequisites ๐Ÿ› ๏ธ

  • OpenAI API Key: You're going to need one. Grab yours here.

Getting Started ๐Ÿš€

  1. Fork this Repository: Head over to this GitHub repo and fork it.
  2. Clone Your Fork: git clone https://github.com/your-username/r4ds-book-chatbot.git
  3. Install Dependencies: Run pip install -r requirements.txt
  4. Documents: Put in your custom documents in the documents folder, unless you want to use R4DS as your training material.
  5. OpenAI API Key: Create a file named api_key.txt and paste your API key in it. Don't worry, it's in the .gitignore file, so it won't be uploaded to GitHub.
  6. Run the Bot: Navigate to the folder and run python chatbot.py

Features ๐ŸŒŸ

  • Conversational Memory: This chatbot remembers what you talked about!
  • CSV Archives: All conversations are saved in a CSV file in communications directory, with a timestamp for easy retrieval.

So go ahead, give it a spin and let the chat begin! ๐ŸŽ‰

Alt text

r4ds-book-chatbot's People

Contributors

harshvardhaniimi avatar

Watchers

 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.