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
interfaceAgentState{messages: Messages[];}// this looks like how you suggest managing msgs in examplesconstchannels={messages: (oldMsgs,newMsgs)=>[...oldMsgs, ...newMsgs],}// to add a message, i'd return a state update likereturn{messages: [newMessage]};
However, if I want to update messages in a different way than just appending (say e.g. clearing all msgs) I can't do that bc the BinaryOperator type requires a (curr value) and b (the update value, which could in theory have a different shape) to be the same
The text was updated successfully, but these errors were encountered:
Moving from Slack: https://langchainpart-saq4831.slack.com/archives/C06PTQF6MCK/p1714034843538009
Current types for the state:
What I want to do:
However, if I want to update messages in a different way than just appending (say e.g. clearing all msgs) I can't do that bc the
BinaryOperator
type requires a (curr value) and b (the update value, which could in theory have a different shape) to be the sameThe text was updated successfully, but these errors were encountered: