-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request]: timeout parameter OllamaEmbeddingFunction #3473
Comments
@Davidyz, rabased on latest main and added timeout kwarg to pass to ollama client. |
Hi, thanks for the update. I tested it and it works, but this needs to be marked as a breaking change because Ollama API doesn't accept 'url' (like With that said, may I ask what's the estimated time of this being merged into EDIT: to be clear, the breaking was due to the shift to Ollama python library, not the addition of |
@Davidyz, thanks for testing it out. Indeed, the URL part is a breaking change, and I'll update the docs to reflect this. That said, I've added support for backward compatibility with legacy URLs (e.g. ending with As far as the release goes, possibly in |
I see. Thanks for the updates. I think I'll still wait for the release so that it's easier to write the version constraints in my |
Describe the problem
When embedding large documents with a not-so-fast Ollama server over a poor network, sometimes the operation times out.
Describe the proposed solution
Add a
float
type parametertimeout
forOllamaEmbeddingFunction
, which controls the timeout for thehttpx.Client
object here.ref: https://www.python-httpx.org/advanced/timeouts/
Alternatives considered
I was going to submit an PR, but then I saw #2946 which refactors
OllamaEmbeddingFunction
to use the Ollama python library. I'm not sure when (or whether) this will be merged, but if it ever gets merged, the proposed solution will no longer be appropriate.Importance
would make my life easier
Additional Information
No response
The text was updated successfully, but these errors were encountered: