Dive into langgraph
TypeDict
- dictionary
x = {
'name': 'python',
'version': 3.11
}
x['name']
# python
x['version']
# 3.11
- Type Dict
from typing_extensions import TypeDict
class Technology(TypeDict):
name: str
version: float
tech = Techonology(name='python', version=3.11)
Lets build a workflow with decision to make
-
Overview

- Refer Here for the changes
Adding LLMs to langgraph
- To interact with llms with langgraph we need to understand Messages. There are 5 types of messages on larger note
- HumanMessage: This is your input to llm (prompt)
- AIMessage: This is response from llm
- SystemMessage
- FunctionCallMessage
- ToolMessage
GCloud CLI Setup
- Install gcloud cli
- login into gcloud
gcloud auth login - setup application auth login
gcloud auth application-default login
Extra pip packages
- INstall langchain and langchain-core
pip install langchain-core langchain
- Install langchain google vertex
pip install -qU "langchain[google-vertexai]"
- Install openai (optional)
pip install -qU "langchain[openai]"
