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

ee.carlrobert.llm.client.openai.completion.response.OpenAIChatCompletionResponse Maven / Gradle / Ivy

There is a newer version: 0.8.28
Show newest version
package ee.carlrobert.llm.client.openai.completion.response;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import ee.carlrobert.llm.completion.CompletionResponse;
import java.util.List;

@JsonIgnoreProperties(ignoreUnknown = true)
public class OpenAIChatCompletionResponse implements CompletionResponse {

  private final String id;
  private final List choices;
  private final OpenAIChatCompletionResponseUsage usage;

  @JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
  public OpenAIChatCompletionResponse(
      @JsonProperty("id") String id,
      @JsonProperty("choices") List choices,
      @JsonProperty("usage") OpenAIChatCompletionResponseUsage usage) {
    this.id = id;
    this.choices = choices;
    this.usage = usage;
  }

  public String getId() {
    return id;
  }

  public List getChoices() {
    return choices;
  }

  public OpenAIChatCompletionResponseUsage getUsage() {
    return usage;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy