-
Notifications
You must be signed in to change notification settings - Fork 2k
Ollama: Support custom Ollama API paths #3470
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: lambochen <[email protected]>
Signed-off-by: lambochen <[email protected]>
|
ref: #3471 |
|
@ThomasVitale @dev-jonghoonpark |
...a/src/test/java/org/springframework/ai/model/ollama/autoconfigure/OllamaApiBuilderTests.java
Show resolved
Hide resolved
Signed-off-by: lambochen <[email protected]>
|
Just out of personal curiosity, Can you be more specific with your example? |
Thank you for your interest in this capability.
Yes, for similar solutions, we also have custom path requirements for OpenAI and other models (such as DeepSeek). |
...src/main/java/org/springframework/ai/model/ollama/autoconfigure/OllamaConnectionDetails.java
Show resolved
Hide resolved
|
@lambochen thanks for raising this issue. If I understood the situation correctly, this would seem more a platform issue than a Spring AI issue. Since the Ollama service is provided on-premises by an internal platform, I wonder if the path conflict issue might be fixed more easily by exposing Ollama via a subpath on the platform? I assume the Ollama endpoints will not change (e.g. For example, it could be served by the platform from Could that work? |
@ThomasVitale Yes, your understanding is correct, it is indeed a platform issue (or rather, the platform's configuration does not match the existing Ollama path well). If Spring AI supports custom paths, it can better integrate with existing platforms from a user's perspective when the platform is not compatible with Ollama's existing paths. |
Thank you for taking time to contribute this pull request!
You might have already read the [contributor guide][1], but as a reminder, please make sure to:
mainbranch and squash your commitsHi, This PR is a feature enhancement change that supports custom Ollama API paths.
Background: When implementing Spring AI in my project, I made some adjustments to the Ollama API, and the API provided externally is a custom path. Therefore, I expect the Spring AI Ollama Model to support custom paths.
Current behavior: The Ollama API path is fixed in the hard-coded code, for example: