Skip to content

Conversation

leelance
Copy link

@leelance leelance commented Oct 13, 2025

Fixed #4619

The update ensures that the keep_alive value follows the proper time duration format (e.g., "3h", "30m", "15s") recognized by the Ollama API.

@ilayaperumalg
Copy link
Member

Hi @leelance , Thanks for the PR! There is a related discussion here where we propose to use DurationParser to handle keep-alive. Could you check and share your opinion? Thanks!

}

return new OllamaApi.EmbeddingsRequest(requestOptions.getModel(), embeddingRequest.getInstructions(),
DurationParser.parse(requestOptions.getKeepAlive()),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The subclass DurationParser can also be removed.

@ilayaperumalg ilayaperumalg added the bug Something isn't working label Oct 13, 2025
@ilayaperumalg
Copy link
Member

@leelance Thanks for the PR! Along with the review comment, Could you also fix the failing tests?

@leelance
Copy link
Author

@leelance Thanks for the PR! Along with the review comment, Could you also fix the failing tests?

Thanks! I’m already working on fixing the failing tests — will update the PR soon.

@ilayaperumalg
Copy link
Member

Rebased, squashed and merged as f32b122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ollama

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ollama Embedding : keep_alive Duration is not sent in the proper format expected by Ollama

2 participants