Next.js Discord

Discord Forum

How to stop streaming assistant message after tool call?

Unanswered
Tomistoma posted this in #help-forum
Open in Discord
Avatar
TomistomaOP
In the Next.js chatbot template. We stream the assistant message after tool call. How do we only stream the tool result and render the component without rendering another assistant message after the tool call?

2 Replies

Avatar
TomistomaOP
Oh nevermind, sounds like marking maxStep as one solves the problem
Avatar
TomistomaOP
But what if I still want to set maxStep as more than one, but for certain tools, we don't want llm to respond after tool is called?