- This GitHub repository integrates
Reflection Llama-3.1 70B
, the world's top open-source large language model (LLM), in a Streamlit-based user interface. The LLM is trained using a new technique called Reflection-Tuning, which enables it to detect and correct mistakes in its own reasoning.
- As the API providers for this model (
Reflection-70B
) have removed the free version, this implementation will not work. But feel free to look into the implementation of the code.
- requests
- streamlit
- langchain
- python-dotenv
- langchain_community
lib
: contains configuration and utility code files.images
: contains UI image.app.py
: main function that will run the Streamlit UI.lib/conifg.py
: contains functions to load our environment variables and get our api keys.lib/utils.py
: contains a function to setup our llm, accept user query and provide response.
- Prerequisites
- Git
- Command line familiarity
- Clone the Repository:
git clone https://github.com/NebeyouMusie/Reflection-70B-Chat.git
- Create and Activate Virtual Environment (Recommended)
python -m venv venv
source venv/bin/activate
for Mac andvenv/bin/activate
for Windows
- Navigate to the projects directory
cd ./Reflection-70B-Chat
using your terminal - Install Libraries:
pip install -r requirements.txt
- Enter your
OPENROUTER_API_KEY
in theexample.env
file then change the file to.env
. You can get yourOPENROUTER_API_KEY
from here. - run
streamlit run app.py
- open the link that appears on your terminal in your preferred browser.
- Start by typing your question in the Chat Input located at the bottom of the app.
- The LLM will provide a response, which will include the action it took to give the answer to the user along with the main response(
output
). - Note that it won't remember previous user interactions (NO MEMORY) as that functionality has not been added.
- Collaborations are welcomed ❤️
- I would like to thank OpenRouter
- LinkedIn: Nebeyou Musie
- Gmail: nebeyoumusie@gmail.com
- Telegram: Nebeyou Musie