LangChain is one of the most popular frameworks for coding complex LLM-powered logic. It provides the ability to batch and stream calls across different LLM providers, vector databases, 3rd party APIs, and much more. In this video, we explore the very basics of getting started with LangChain - understanding how to build a rudimentary chain complete with templating and an LLM call. Let's go!
Links:
Code from video - https://decoder.sh/videos/langchain-fundamentals:-build-your-first-chain
LangChain - https://langchain.com
Ollama Integration - https://api.python.langchain.com/en/latest/llms/langchain_community.llms.ollama.Ollama.html
Prompts & Templates - https://python.langchain.com/v0.1/docs/modules/model_io/prompts/quick_start/
Timestamps:
00:00 - Intro
00:25 - Set up Environment
02:41 - Introducing Runnable
03:15 - Message Format
03:52 - ChatModel
05:10 - Why are there so many ways to do the same thing?
06:05 - Types of Messages
07:10 - Introducing Templates
11:12 - Combining Templates w/ LLMs
12:09 - Introducing Pipe
12:36 - Running our chain
13:36 - Review