Open astoilkov opened 9 months ago
Just saw that the same thing happens without stream: true
as well.
I have this error too in Chromium and Safari, but Firefox works fine.
One idea is to split the code in 2 libraries. One for browser, without the push/pull stuff and anything that requires fs (call it ollama-js-browser
). With just the chat API, model list. (this is what I did essentially - ripped the chat part of the library and vendored the code in https://github.com/da-z/llamazing)
I think Electron should be considered as well. There are both Node and browser APIs.
I'm having the same issue using this within a web app on Chrome. I'm just using the API directly in the meantime, but would prefer to use this package for simplification.
Running this code:
Produces this error: