Git Product home page Git Product logo

context-based-llmchatbot's Introduction

๐Ÿ’ Document-Based/Context-Based Chatbot with Langchain, LLM (GPT-3), and Chroma ๐Ÿ“

build LinkedInย  Medium Articles

๐Ÿค– This is a chatbot that uses a combination of Langchain, LLM (GPT-3), and Chroma to generate responses based on a user's input and a provided document or context. Features

  1. Generates responses based on a user's input and a provided document or context
  2. Uses Langchain to preprocess the user's input and document/context
  3. Uses LLM (GPT-3) to generate responses based on the preprocessed input and document/context
  4. Uses Chroma to highlight important words and phrases in the document/context
  5. Built with Python and Streamlit, making it easy to run and demo

๐ŸŽฏ Demo:

ChatScreen 1 ChatScreen 2
ChatScreen 3

Technical Architecture

Documentation

Read the article to learn more.

Requirements

Python 3.7 or later
Streamlit 0.80.0 or later
OpenAI API key with access to LLM (GPT-3)

Installation

Clone the repository:

git clone https://github.com/your-username/your-repository.git

Install the required Python packages:

pip install -r requirements.txt

Set up your OpenAI API key by creating a .env file in the root directory of the project with the following contents:

OPENAI_API_KEY=<your-api-key-here>

Run the Streamlit app:

streamlit run app.py

Cutomize the Document

If you would like to test with any personalized document please replace the docs directory.

Usage

  1. Enter a message or question in the imput prompt panel. This is what you want the chatbot to respond to.
  2. Click the "Send" button or press Enter to generate a response from the chatbot.
  3. ๐ŸŽ‰ The response will appear in the right-hand panel

Contributions

๐Ÿ™Œ Contributions are welcome! If you have any suggestions for improving this chatbot, please submit a pull request. License


If you like this do star to this repo โญ and contributes...๐Ÿ’๐Ÿ’๐Ÿ’


Thanks for reading...๐Ÿ™๐Ÿ™๐Ÿ™


๐Ÿ“ This project is licensed under the MIT License. See the LICENSE file for details.

context-based-llmchatbot's People

Contributors

abonia1 avatar

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  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

context-based-llmchatbot's Issues

detectron2?

2023-04-03 17:25:05.926 detectron2 is not installed. Cannot use the hi_res partitioning strategy. Falling back to partitioning with the fast strategy.
Is it it a problem?
can't install via "pip install detectron2"

Can not install pycocotools

after run the requestfile i have this issue:
Failed to build pycocotools
ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects
macos 12.6.5
Python 3.7.6

requirements.txt

Thank you for this! Is there a requirements.txt file? I can't have it run on my machine

openai api key

keep getting this error File "/Users/..../python3.10/site-packages/openai/api_requestor.py", line 682, in _interpret_response_line
raise self.handle_error_response(
openai.error.AuthenticationError: Incorrect API key provided: YOUR-OPE*******-KEY. You can find your API key at https://platform.openai.com/account/api-keys. "
i tested my api key with other chatbots and it 's working fine
even though i added a new api key both in .env and also did the export in the terminal as export openai_api_key="key"
are you experiencing the same problem?
which model do you use gpt4 or gpt3.5?
do you have a twitter account ?
thank you!

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.