https://github.com/afondiel/langchain-for-llm-application-dev-deeplearningai
Crash course on LangChain for LLM Application Developement by DeepLearningAI
https://github.com/afondiel/langchain-for-llm-application-dev-deeplearningai
bard chatgpt deeplearning-ai google gpt-3 gpt-4 lambda langchain large-language-models llama llm nllb200 openai palm sparrow
Last synced: about 2 months ago
JSON representation
Crash course on LangChain for LLM Application Developement by DeepLearningAI
- Host: GitHub
- URL: https://github.com/afondiel/langchain-for-llm-application-dev-deeplearningai
- Owner: afondiel
- Created: 2023-07-05T15:03:36.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-13T19:16:52.000Z (about 1 year ago)
- Last Synced: 2024-10-29T09:00:40.996Z (7 months ago)
- Topics: bard, chatgpt, deeplearning-ai, google, gpt-3, gpt-4, lambda, langchain, large-language-models, llama, llm, nllb200, openai, palm, sparrow
- Language: Jupyter Notebook
- Homepage:
- Size: 19.5 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# LangChain for LLM Application Developement - DeepLearningAI
## Overview
Crash course on LangChain for LLM Application Developement by [DeepLearning.AI](https://learn.deeplearning.ai/langchain/lesson/1/introduction) and lectured by `Andrew Ng` and `Harrison Chase` [LangChain](https://python.langchain.com/docs/get_started/introduction.html) Founder.
## Course Plan
- [Lesson0: Introduction](#)
- [Lesson1: Models, Prompts and Parsers](#)
- [Lesson2: Memory](#)
- [Lesson3: Chains](#)
- [Lesson4: Question & Answer](#)
- [Lesson5: Evaluation](#)
- [Lesson6: Agents](#)
- [Conclusion](#)## Setup & Dependencies
Setup & import your openai key:
- [OpenAI Key](https://platform.openai.com/account/api-keys)
```python
import os
import openaifrom 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
```python
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"]
```
## Lab - Notebooks|Chapter|Exercises|
|--|--|
|[Lesson1: Models, Prompts and Parsers](./lab/L1-Model_prompt_parser.ipynb)|[](https://colab.research.google.com/github/afondiel/LangChain-For-LLM-Application-Dev-DeepLearningAI/blob/main/lab/L1-Model_prompt_parser.ipynb)|
|[Lesson2: Memory](./lab/L2-Memory.ipynb)|[](https://colab.research.google.com/github/afondiel/LangChain-For-LLM-Application-Dev-DeepLearningAI/blob/main/lab/L2-Memory.ipynb)|
|[Lesson3: Chains](./lab/L3-Chains.ipynb)|[](https://colab.research.google.com/github/afondiel/LangChain-For-LLM-Application-Dev-DeepLearningAI/blob/main/lab/L3-Chains.ipynb)|
|[Lesson4: Question & Answer](./lab/L4-QnA.ipynb)|[](https://colab.research.google.com/github/afondiel/LangChain-For-LLM-Application-Dev-DeepLearningAI/blob/main/lab/L4-QnA.ipynb)|
|[Lesson5: Evaluation](./lab/L5-Evaluation.ipynb)|[](https://colab.research.google.com/github/afondiel/LangChain-For-LLM-Application-Dev-DeepLearningAI/blob/main/lab/L5-Evaluation.ipynb)|
|[Lesson6: Agents](./lab/L6-Agents.ipynb)|[](https://colab.research.google.com/github/afondiel/LangChain-For-LLM-Application-Dev-DeepLearningAI/blob/main/lab/L6-Agents.ipynb)|## References
Main Course :
- https://learn.deeplearning.ai/langchain/lesson/1/introductionLangChain resources :
- https://learn.deeplearning.ai/langchain/lesson/1/introductionOthers short Free Courses available on DeepLearning.AI :
- https://learn.deeplearning.ai/