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
In brief, i want to stop the request the user just made while ollama is responding to them. The problem is that i followed the example given by this lib but my console tell that the property abort is undefined. And my code editor them something similar. So i guess i have to create a new variable from the constructor of AbortableAsyncIterator when i declare the stream variable, but i don't know how to do that. Can someone help me? I use typescript and React.
There is a screenshot that the web console show me when i try to stream.abort() like the example show:
The text was updated successfully, but these errors were encountered:
Just experienced this same issue. The stream doesn't get created until Ollama starts responding to the request (which could be a while if you're loading a large model), so you will get this error if you try to abort before that. Just add an if (stream) check before trying to abort it. I'll modify the example to demonstrate this!
In brief, i want to stop the request the user just made while ollama is responding to them. The problem is that i followed the example given by this lib but my console tell that the property abort is undefined. And my code editor them something similar. So i guess i have to create a new variable from the constructor of AbortableAsyncIterator when i declare the stream variable, but i don't know how to do that. Can someone help me? I use typescript and React.
There is a screenshot that the web console show me when i try to stream.abort() like the example show:
The text was updated successfully, but these errors were encountered: