FR: keep-going arg on failed embeddings.
Hi!
Can you consider adding a keep-going argument that skips errors on an embeddibg call?
I've never actually been able to use llm's embeddings because when I really need an embedding search over lots of documents there are always some that, for one reason or another, will crash my ollama.
For example there was a single upgrade the other day that broke only the model that I'm using (see issue). I've talk with the llm-ollama author and apparently there is no way on the plugin side to gracefully handle errors as llm only expects an embedding.
So every time I wanted to use it I had to fallback to using wdoc, my rag library but it's considerably more complex and heavy.
What do you think?
I think the keep-going argument is something that Ollama needs to support, not llm. That said, on the llm side there needs to be a way to signal/represent "failed" embeddings.
On don't see how ollama could do something like that. Care to develop? What should ollama return in that case?
Well, that's their decision. Empty vector, NaN, something else.
- I don't trust ollama to handle catastrophic failures. And they are exceptionnary slow moving for this kind of issue (though I understand they have a lot to do, I'm not criticizing).
- Why go as close as possible to the error instead of trying to catch them all from the caller's side? That's more robust.
- Say ollama returned an empty vector: the caller cannot know why it failed ; llm would still crash after trying to handle it.
If @simonw is okay with the idea I could do a quick PR.