You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1/ a graph state key is a Pydantic model
class Analyst(BaseModel):
description: str = Field(
2/ i edit it in Studio
3/ edited state is no long a Pydantic model (converted to dict after edit in Studio, IIUC)
4/ anything in code that assumes Pydantic model will then break w/ the edited state
e.g., accessing one attribute -
analyst.description
error -
AttributeError: 'dict' object has no attribute 'description'
The text was updated successfully, but these errors were encountered:
The issue is very likely roots in using Pydantic for agent state.
I checked it by returning to using TypedDict for agent state and this worked in Langgrapg Studio
1/ a graph state key is a Pydantic model
class Analyst(BaseModel):
description: str = Field(
2/ i edit it in Studio
3/ edited state is no long a Pydantic model (converted to dict after edit in Studio, IIUC)
4/ anything in code that assumes Pydantic model will then break w/ the edited state
e.g., accessing one attribute -
analyst.description
error -
AttributeError: 'dict' object has no attribute 'description'
The text was updated successfully, but these errors were encountered: