-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Possibility of offloading to Ollama based endpoint instead of OpenAI? #154
Comments
You want to look in the tasks module, specifically |
Could it be possible to have an if statement in there to test if settings.OLLAMA_MODEL etc are there and switch to ollama if they exist? That way we could change the endpoint by providing config for the base_url, the model, the request_timeout for Ollama. I don't know deeply enough how this would affect everything yet, or how you are pulling your settings in, but this would be super useful for those in the situation we are in that we cannot offload to hardware owned by others |
Some quick and dirty code using the LlamaIndex library that does the job with my local ollama endpoint:
|
Awesome! If you wanted to open a PR to create a task that uses Ollama, that would be AWESOME :-). We'd need to run Ollama, probably in another container, so you'd need to update the compose stack too. Would definitely welcome the contribution (and would be happy to review / pair / consult). It's something I've wanted to do, I just don't have the time to do it all :-) |
Ok I'll see if I can put some time into it. I'm not all that familiar with docker, so some of that aspect is a mystery to me. Personally, I'd probably leave the Ollama installation as a separate object, as it changes often, and you'd want it to be a separate service rather than lumped in. Access is still via API so it's nice and simple. |
I'm still pretty new to your project, but through digging around I can see various calls to OpenAI's API and in the config there's a section for the API key.
Is it possible to offload to an Ollama instance instead so that all data endpoints are locally based?
Our big focus is that any kind of processing like this for our sensitive documents needs to occur 100% locally.
I see that LlamaIndex supports Ollama as an endpoint, is that how OpenAI is being reached (through LlamaIndex?)
The text was updated successfully, but these errors were encountered: