Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ OllamaApi.EmbeddingsRequest ollamaEmbeddingRequest(EmbeddingRequest embeddingReq
}

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.

OllamaEmbeddingOptions.filterNonSupportedFields(requestOptions.toMap()), requestOptions.getTruncate());
requestOptions.getKeepAlive(), OllamaEmbeddingOptions.filterNonSupportedFields(requestOptions.toMap()),
requestOptions.getTruncate());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ public Duration getEvalDuration() {
public record EmbeddingsRequest(
@JsonProperty("model") String model,
@JsonProperty("input") List<String> input,
@JsonProperty("keep_alive") Duration keepAlive,
@JsonProperty("keep_alive") String keepAlive,
@JsonProperty("options") Map<String, Object> options,
@JsonProperty("truncate") Boolean truncate) {

Expand Down
Loading