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

com.theokanning.openai.completion.CompletionChoice Maven / Gradle / Ivy

package com.theokanning.openai.completion;

import lombok.Data;

/**
 * A completion generated by OpenAI
 *
 * https://beta.openai.com/docs/api-reference/completions/create
 */
@Data
public class CompletionChoice {
    /**
     * The generated text. Will include the prompt if {@link CompletionRequest#echo } is true
     */
    String text;

    /**
     * This index of this completion in the returned list.
     */
    Integer index;

    /**
     * The log probabilities of the chosen tokens and the top {@link CompletionRequest#logprobs} tokens
     */
    LogProbResult logprobs;

    /**
     * The reason why GPT stopped generating, for example "length".
     */
    String finish_reason;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy