langgraph/how-tos/state-model/ #1306
Replies: 6 comments 3 replies
-
This is pretty cool, but i don't like how black box the model is. Can new tools be added to the model, post compile? Doesn't seem so. This is more of a defect of langchain, however |
Beta Was this translation helpful? Give feedback.
-
also, in the description of pydantic state it says: |
Beta Was this translation helpful? Give feedback.
-
Can you please help me understand other attributes when creating StateGraph?
|
Beta Was this translation helpful? Give feedback.
-
When I try to run this example, I get an error from the |
Beta Was this translation helpful? Give feedback.
-
When I use BaseModel for the agent state and inside it I use a list of class also defined as BaseModel I am getting serialisation issues and "type":"not_implemented Precise example is agent state class AgentState(BaseModel):
And reference defnied as class Reference(BaseModel):
Are causing type not implemented references":[{"lc":1,"type":"not_implemented","id":["app","state","Reference"],"repr":"Reference(title='How to Create a Successful Startup', url='https://example.com/startup-guide')"},{"lc":1,"type":"not_implemented","id":["app","state","Reference"],"repr":"Reference(title='Market Research Fundamentals', url='https://example.com/market-research')"},{"lc":1,"type":"not_implemented","id":["app","state","Reference"],"repr":"Reference(title='Startup Funding Strategies', url='https://example.com/funding-guide')"}]}" While if I define the reference as TypedDict class Reference(TypedDict):
All is fine "references":[{"title":"How to Create a Successful Startup","url":"https://example.com/startup-guide"},{"title":"Market Research Fundamentals","url":"https://example.com/market-research"},{"title":"Startup Funding Strategies","url":"https://example.com/funding-guide"}]}" Am I doing something wrong or why is the nested BaseModel not recognised correctly and the nested TypedDict works fine? |
Beta Was this translation helpful? Give feedback.
-
When I run
|
Beta Was this translation helpful? Give feedback.
-
langgraph/how-tos/state-model/
Build language agents as graphs
https://langchain-ai.github.io/langgraph/how-tos/state-model/
Beta Was this translation helpful? Give feedback.
All reactions