The LangChain Unchained series is a collection of small LangChain projects with a Streamlit UI. Each project demonstrates the implementation of different components of LangChain, a framework for working with large language models.
To run the LangChain Unchained projects, follow these steps:
-
Clone the repository.
-
Install the required dependencies.
-
Set up the OpenAI API Key:
- Sign up for an account on the OpenAI platform (https://platform.openai.com/playground) if you haven't already.
- Obtain an API key from OpenAI.
- Set the
OPENAI_API_KEY
environment variable with your API key. - Change the .env_ file to .env
Each LangChain Unchained project is located in a separate file. To run a specific project, navigate to its directory and execute the Streamlit command:
streamlit run project_x.py
This will start the Streamlit application, and you can access it in your browser by opening the provided URL.
- File:
project_1.py
- Description: This project helps you create a strategy for a four-hour workday based on a YouTube video. It utilizes LangChain components like YouTube transcript loader, text splitting, summarization_chain, and LLMChain. The Streamlit UI allows you to enter a YouTube video URL, and it generates a strategy and plan for your workday.
- File:
project_2.py
- Description: This project focuses on the importance of prompts in achieving excellent results with Large Language Models (LLMs). The Prompt Generator tool helps you generate effective prompts for interacting with LLMs. It leverages Few-shot learning techniques by utilizing example prompts to instruct the model.
Contributions to the LangChain Unchained series are welcome! If you have ideas for new projects, bug fixes, or improvements, feel free to open an issue or submit a pull request.
I'll be updating the directory over the coming days.
For any questions, feedback, or suggestions regarding the LangChain Unchained series, you can reach out on Twitter or send an email.
Enjoy exploring the LangChain Unchained projects and have fun experimenting with the LangChain framework!