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
If I invoke stream() method directly on a model, the returned type is typed with AIMessageChunk.
However, if I invoke it on the agent created by createReactAgent(), it's any.
Is there any way to specify the type of the return message on createReactAgent() call? Of course I can just type cast the stream object, but I'd like to know whether it's the only option.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
If I invoke
stream()
method directly on a model, the returned type is typed withAIMessageChunk
.However, if I invoke it on the agent created by
createReactAgent()
, it'sany
.Is there any way to specify the type of the return message on
createReactAgent()
call? Of course I can just type cast the stream object, but I'd like to know whether it's the only option.Beta Was this translation helpful? Give feedback.
All reactions