Skip to content

Commit 91fb151

Browse files
committed
fix: Adjust the type of the "think" field in Ollama to support its default behavior, thereby ensuring compatibility with older versions of Ollama calls.
Signed-off-by: Sun Yuhan <[email protected]>
1 parent af9958b commit 91fb151

File tree

1 file changed

+2
-2
lines changed
  • models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ public static class Builder {
459459
private String keepAlive;
460460
private List<Tool> tools = List.of();
461461
private Map<String, Object> options = Map.of();
462-
private boolean think;
462+
private Boolean think;
463463

464464
public Builder(String model) {
465465
Assert.notNull(model, "The model can not be null.");
@@ -504,7 +504,7 @@ public Builder options(OllamaOptions options) {
504504
return this;
505505
}
506506

507-
public Builder think(boolean think) {
507+
public Builder think(Boolean think) {
508508
this.think = think;
509509
return this;
510510
}

0 commit comments

Comments
 (0)