Is it possible to stop generate answer while using stream?

In web version i have button “stop generate”. Can i stop generating using stream by API? I know about max_limit and stop parameters, but what if i can’t specify them before sending request? In other words, i just want to create same button like in web version


I am facing exactly the same issue here… Any solution?

1 Like