ee.carlrobert.llm.client.google.completion.GoogleCompletionContent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of llm-client Show documentation
Show all versions of llm-client Show documentation
Java http client wrapped around the OkHttp3 library
package ee.carlrobert.llm.client.google.completion;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import java.util.List;
import java.util.stream.Collectors;
@JsonInclude(Include.NON_NULL)
public class GoogleCompletionContent {
private List parts;
private String role;
public GoogleCompletionContent() {
}
public GoogleCompletionContent(List texts) {
this(null, texts);
}
public GoogleCompletionContent(String role, List texts) {
this.parts = texts.stream().map(GoogleContentPart::new).collect(Collectors.toList());
this.role = role;
}
public GoogleCompletionContent(List parts, String role) {
this.parts = parts;
this.role = role;
}
public List getParts() {
return parts;
}
public void setParts(
List parts) {
this.parts = parts;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
}