All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ee.carlrobert.llm.client.google.completion.GoogleCompletionContent Maven / Gradle / Ivy

There is a newer version: 0.8.28
Show newest version
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;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy