Blog Post: bugbytes.io/posts/langchain-s...
In this video, we'll build a recipe generator app which allows users to enter a list of ingredients, and we use langchain to send requests to OpenAI to generate potential recipes based on that list of ingredients.
We will use Streamlit to build a small UI to enable users to enter ingredients, and then display the recipes returned by the language model.
We will see a few features of langchain in doing so, including PromptTemplate, LLMChain, and SequentialChain / SimpleSequentialChain objects
☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
ko-fi.com/bugbytes
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
00:38 Setting up environment for langchain
01:27 Creating langchain LLM for OpenAI queries
03:32 Creating langchain PromptTemplate objects for LLM prompt formatting
06:11 Building Streamlit UI to allow prompt creation
08:10 Creating LLMChain object for the meal planner
13:42 Creating a SimpleSequentialChain to chain the 2 LLMChains sequentially
16:42 Using SequentialChain to get outputs from both chains
19:21 Writing both outputs to streamlit columns
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: bugbytes.io/posts/langchain-s...
👾 Github: github.com/bugbytes-io/
🐦 Twitter: / bugbytesio
📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
Blog: bugbytes.io/posts/langchain-s...
Langchain: docs.langchain.com/docs/
PromptTemplates: python.langchain.com/en/lates...
LLMChain and chains: python.langchain.com/en/lates...
Sequential Chains: python.langchain.com/en/lates...
OpenAI API Keys: platform.openai.com/account/a...
#python #streamlit #langchain #datascience #llm
Негізгі бет Langchain, OpenAI and Streamlit - Using Langchain & Streamlit to Build a Recipe Generator
Пікірлер: 44