-
Notifications
You must be signed in to change notification settings - Fork 103
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
Re-write the Ollama dev service #1148
Conversation
This comment has been minimized.
This comment has been minimized.
e98aa36
to
a0b9be3
Compare
This comment has been minimized.
This comment has been minimized.
Thanks a lot for this work @edeandrea. Just to have a public record what I also said in public to you: I don't plan to spend any time on this whatsoever, so if you believe this solves a use case you have and you are willing to assume the full maintainance of all this Ollama in a container stuff, I'm willing to accept it. |
Sounds good! |
👌 |
@geoand one thought/question I had while working on this - the devservice stuff that you wrote in Should those really belong in the Whats weird is Line 37 in cefbc8c
quarkus.langchain4j.devservices config item? Doesn't this belong nested under .ollama. as well?
I can do this additional cleanup if you think it makes sense. Otherwise I'll leave it as is. |
Yes, because the hope is that at some point Ollama will be able to provide all OpenAI APIs as well |
Got it. I'll leave things as is then. |
👌 |
1798403
to
0258cdb
Compare
This comment has been minimized.
This comment has been minimized.
The current implementation of the Ollama dev service is a hot mess. It doesn't work properly. Therefore I have done the following things: 1) Merged the `quarkus-langchain4j-ollama-dev-service` artifact into the `quarkus-langchain4j-ollama-deployment` artifact. 2) The dev service is aware of whether or not there is a local Ollama service running on port `11434`. If so, it doesn't do anything. 3) If there isn't a local Ollama service running on port `11434` then it will start an `ollama/ollama:latest` container on a random port. It will also expose a few configuration properties with values of the host & port the container is running on. 4) The container shares the filesystem location with the Ollama client (`user.home/.ollama`), so any models downloaded by the client or the container are shared with each other, and therefore only need to be downloaded once.
b9e197e
to
d94639b
Compare
Status for workflow
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice work!
The current implementation of the Ollama dev service is a hot mess. It doesn't work properly. Therefore I have done the following things:
quarkus-langchain4j-ollama-devservices
artifact into thequarkus-langchain4j-ollama-deployment
artifact.11434
. If so, it doesn't do anything.11434
then it will start anollama/ollama:latest
container on a random port. It will also expose a few configuration properties with values of the host & port the container is running on, which can be used by applications to manually configure things if need be.user.home/.ollama
), so any models downloaded by the client or the container are shared with each other, and therefore only need to be downloaded once by one or the other.The documentation has also been updated to reflect everything.