Problem 1: Email Tone Changer
- We provide the email text to the agent (graph) and also we will be setting the desired tone (formal | friendly | concise)
- Plan:
- State:
- draft: str (input)
- desired_tone: str (input)
- email: str
- llm model:
- gemini flash lite (latest) (*)
- gemini flash (latest)
- gemini pro (latest)
- Phase 1: Sequential nodes
- Gaps:
- Langsmith (API Key)
- Interacting with llms from graph
- Prompt Templates
- Messages
Langsmith API Key
- Watch classroom recording
Project setup
- Create a new project with uv and activate virtual environment
- Now add package
uv add python-dotenv
- Now create a file called as
.env and copy the variables from langsmith
- To test whether the values are loaded or not watch classroom recording
- Now lets add langgraph, langchain
uv add langgraph langchain
- Now since we have decided to use gemini models from gcp Refer Here for all providers
Langchain Messages
- SystemMessage: This is instruction settings for prompt
- HumanMessage: This is the actual question
- AIMessage: This is response message type representing this is generated by llm/model