Skip to content

Commit 15628a3

Browse files
committed
Fix a compliation error caused with pervious merge
1 parent aca8ffd commit 15628a3

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/OllamaChatClient.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,11 @@ OllamaApi.ChatRequest ollamaChatRequest(Prompt prompt, boolean stream) {
174174
requestBuilder.withKeepAlive(mergedOptions.getKeepAlive());
175175
}
176176

177-
if (mergedOptions.getTemp)
177+
if (mergedOptions.getTemplate() != null) {
178+
requestBuilder.withTemplate(mergedOptions.getTemplate());
179+
}
178180

179-
return requestBuilder.build();
181+
return requestBuilder.build();
180182
}
181183

182184
private String fromMediaData(Object mediaData) {

models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaApi.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ public static class Builder {
426426
private boolean stream = false;
427427
private String format;
428428
private String keepAlive;
429+
private String template;
429430
private Map<String, Object> options = Map.of();
430431

431432
public Builder(String model) {
@@ -453,6 +454,11 @@ public Builder withKeepAlive(String keepAlive) {
453454
return this;
454455
}
455456

457+
public Builder withTemplate(String template) {
458+
this.template = template;
459+
return this;
460+
}
461+
456462
public Builder withOptions(Map<String, Object> options) {
457463
Objects.requireNonNullElse(options, "The options can not be null.");
458464

0 commit comments

Comments
 (0)