Crash course on LangChain for LLM Application Developement by DeepLearning.AI and lectured by Andrew Ng
and Harrison Chase
LangChain Founder.
- Lesson0: Introduction
- Lesson1: Models, Prompts and Parsers
- Lesson2: Memory
- Lesson3: Chains
- Lesson4: Question & Answer
- Lesson5: Evaluation
- Lesson6: Agents
- Conclusion
Setup & import your openai key:
import os
import openai
from dotenv import load_dotenv, find_dotenv
_ = load_dotenv(find_dotenv()) # read local .env file
openai.api_key = os.environ['OPENAI_API_KEY']
- OpenAI API call
def get_completion(prompt, model="gpt-3.5-turbo"):
messages = [{"role": "user", "content": prompt}]
response = openai.ChatCompletion.create(
model=model,
messages=messages,
temperature=0,
)
return response.choices[0].message["content"]
Chapter | Exercises |
---|---|
Lesson1: Models, Prompts and Parsers | |
Lesson2: Memory | |
Lesson3: Chains | |
Lesson4: Question & Answer | |
Lesson5: Evaluation | |
Lesson6: Agents |
Main Course :
LangChain resources :
Others short Free Courses available on DeepLearning.AI :