Confusing behavior when using add_conditional_edges
with BaseModel
#3104
Labels
question
Further information is requested
add_conditional_edges
with BaseModel
#3104
Discussed in #2226
Originally posted by observerw October 30, 2024
Let's say we have the following graph:
The output is:
After I added
node_b_edge
afternode_b
, I was expecting this function to accept aState
with aprivate_b
field, or at least a completeState
. However, the function actually accepts a parameter of typeNodeBInput
instead ofState
! This is very confusing and results in an error if I wish to use theprivate_b
field to determine the output ofnode_b_edge
.Nonetheless, when I ditched the BaseModel and used TypedDict, the run results were:
Well, at least I was able to access the
private_b
, So I guess the problems here associated with the use of BaseModel.Is this behavior expected? How can I access
private_b
when using BaseModel?The text was updated successfully, but these errors were encountered: