The open-source framework that we will be using is called LangChain. It is a framework designed to facilitate the development of applications powered by large language models (LLMs). It provides tools and abstractions that help developers build complex applications by integrating LLMs with other data sources and computational resources.
There are two ways in which you can create GenAI Applications (also known as AI Agents):
-
Have a paid API service, that provides access to closed-source LLMs:
-
Download a local model:
- Ollama
- This is what we will be using for this tutorial! It's super easy and allows you to download any flavor of Llama models: https://github.com/ollama/ollama
- HuggingFace
- Ollama
Once Ollama is installed, you will be able to run below command:
ollama pull llama3.2:3b
This will pull the specific model and install it on your machine. Ollama will then serve this model locally, basically creating a local API for you! You need to be running the application so that you can call the model though.
git clone https://github.com/TheoPetropoulos/langchain-course.git
cd langchain-course
python3 -m venv langchain-env
langchain-env\Scripts\activate
source langchain-env/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
cd exercises
python3 exercises/[choose_exercise].py
- You might not need to use python3. This has to do with your current environment setup.
- I am using python3.12