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

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

package com.theokanning.openai.completion;

import com.theokanning.openai.Usage;
import lombok.Data;

import java.util.List;

/**
 * An object containing a response from the completion api
 *
 * https://beta.openai.com/docs/api-reference/completions/create
 */
@Data
public class CompletionResult {
    /**
     * A unique id assigned to this completion.
     */
    String id;

    /**https://beta.openai.com/docs/api-reference/create-completion
     * The type of object returned, should be "text_completion"
     */
    String object;

    /**
     * The creation time in epoch seconds.
     */
    long created;

    /**
     * The GPT model used.
     */
    String model;

    /**
     * A list of generated completions.
     */
    List choices;

    /**
     * The API usage for this request
     */
    Usage usage;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy