ee.carlrobert.llm.client.openai.completion.response.OpenAITextCompletionResponse 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.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 OpenAITextCompletionResponse implements CompletionResponse {
private final String id;
private final List choices;
@JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
public OpenAITextCompletionResponse(
@JsonProperty("id") String id,
@JsonProperty("choices") List choices) {
this.id = id;
this.choices = choices;
}
public String getId() {
return id;
}
public List getChoices() {
return choices;
}
}