Ollama4j
A Java library (wrapper/binding) for Ollama server.
Loading...
Searching...
No Matches
OllamaGenerateRequest.java
Go to the documentation of this file.
1/*
2 * Ollama4j - Java library for interacting with Ollama server.
3 * Copyright (c) 2025 Amith Koujalgi and contributors.
4 *
5 * Licensed under the MIT License (the "License");
6 * you may not use this file except in compliance with the License.
7 *
8*/
9package io.github.ollama4j.models.generate;
10
11import io.github.ollama4j.models.request.OllamaCommonRequest;
12import io.github.ollama4j.tools.Tools;
13import io.github.ollama4j.utils.OllamaRequestBody;
14import java.util.List;
15import lombok.Getter;
16import lombok.Setter;
17
18@Getter
19@Setter
21
22 private String prompt;
23 private List<String> images;
24 private String system;
25 private String context;
26 private boolean raw;
27 private boolean think;
28 private boolean useTools;
29 private List<Tools.Tool> tools;
30
32
33 public OllamaGenerateRequest(String model, String prompt) {
34 this.model = model;
35 this.prompt = prompt;
36 }
37
38 public OllamaGenerateRequest(String model, String prompt, List<String> images) {
39 this.model = model;
40 this.prompt = prompt;
41 this.images = images;
42 }
43
44 @Override
45 public boolean equals(Object o) {
46 if (!(o instanceof OllamaGenerateRequest)) {
47 return false;
48 }
49 return this.toString().equals(o.toString());
50 }
51}
OllamaGenerateRequest(String model, String prompt, List< String > images)