@@ -402,6 +402,7 @@ public Message build() {
402
402
* @param format The format to return the response in. Currently, the only accepted
403
403
* value is "json".
404
404
* @param keepAlive The duration to keep the model loaded in ollama while idle. https://pkg.go.dev/time#ParseDuration
405
+ * @param template The prompt template (overrides what is defined in the Modelfile).
405
406
* @param options Additional model parameters. You can use the {@link OllamaOptions} builder
406
407
* to create the options then {@link OllamaOptions#toMap()} to convert the options into a
407
408
* map.
@@ -413,6 +414,7 @@ public record ChatRequest(
413
414
@ JsonProperty ("stream" ) Boolean stream ,
414
415
@ JsonProperty ("format" ) String format ,
415
416
@ JsonProperty ("keep_alive" ) String keepAlive ,
417
+ @ JsonProperty ("template" ) String template ,
416
418
@ JsonProperty ("options" ) Map <String , Object > options ) {
417
419
418
420
public static Builder builder (String model ) {
@@ -473,7 +475,7 @@ public Builder withOptions(OllamaOptions options) {
473
475
}
474
476
475
477
public ChatRequest build () {
476
- return new ChatRequest (model , messages , stream , format , keepAlive , options );
478
+ return new ChatRequest (model , messages , stream , format , keepAlive , template , options );
477
479
}
478
480
}
479
481
}
0 commit comments