Python Variable Type Hints

python
Author

Lawrence Wu

Published

July 18, 2024

Today I learned you can use in-line type hints. Below you are specifying that the object react_prompt is of type PromptTemplate.

from langchain_core.prompts import PromptTemplate
from langchain import hub
react_prompt: PromptTemplate = hub.pull("hwchase17/react")