spring-projects / spring-projects/spring-ai
Ollama: Support custom Ollama API paths
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
Please do a quick search on GitHub issues first, the feature you are about to request might have already been requested.
Expected Behavior
Ollama: Support custom Ollama API paths
Current Behavior
The Ollama API path is fixed in the hard-coded code, for example:
public ListModelResponse listModels() {
return this.restClient.get()
.uri("/api/tags")
.retrieve()
.body(ListModelResponse.class);
}
Context
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Ollama model code containing the listModels() entry point and its hard-coded "/api/tags" URI. Review the other Ollama API paths there and determine how custom paths should be configured; done means requests can use the externally provided custom API paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, ollama
- Domain
- ai, api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100