Coder Social home page Coder Social logo

streamlit-llm-chatbot's Introduction

streamlit-llm-chatbot

A simple chatbot using Groq backed LLM using Retrieval Augmented Generation (RAG) with Langchain.

It is a streamlit app that lets you make retrieval augmented generation from a web source using LLM and LangChain. It is supported by Groq API to make the LLM inference.(It is free for personal use with limits, highly recommended to try it out!)

What can be done?

  1. Connect to a Llama3 or Gemma using your Groq API key, and chat with it!
  2. Input any website, and query/chat based on questions from the website and LLM's knowledge.
  3. Input a Git repository, and query/chat based on the files in the repository.

Try out the app on Streamlit - streamlit-llm-chatbot

Setup instructions

Create a virtual environment to install from requirements file. You need Python 3.10 or higher.

pip install -r requirements.txt

Run

To run the app on streamlit, use the following command:

streamlit run main.py

The application will automatically open in your default browser. You can check the logs in the terminal you spun the streamlit server.

LLMs and embeddings supported

The available LLM backends as supported by Groq are as follows:

  • Llama3: "llama3-70b-8192" - Enabled by default
  • Llama3: "llama3-8b-8192"
  • Gemma: "gemma-7b-it"

Embeddings: Supports Hugging Face Embeddings by default, which is now hardcoded to "sentence-transformers/all-mpnet-base-v2". Can be dynamic in the future.

Credits

A big shoutout to all the detailed documentations from Langchain and Streamlit to help build the app. Groq has been generous with their rate limits for the LLMs which enabled the development of the app. Thanks to pip-chill for a chill pip freeze. Used Loom for the demo video of the app.

streamlit-llm-chatbot's People

Contributors

tharunsuresh-code avatar

Stargazers

Fabricio Asfora avatar

Watchers

Kostas Georgiou avatar  avatar

Forkers

domgallego

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.