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

com.theokanning.openai.completion.chat.ChatCompletionChoice Maven / Gradle / Ivy

There is a newer version: 0.18.2
Show newest version
package com.theokanning.openai.completion.chat;
import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

/**
 * A chat completion generated by OpenAI
 */
@Data
public class ChatCompletionChoice {

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

    /**
     * The {@link ChatMessageRole#assistant} message or delta (when streaming) which was generated
     */
    @JsonAlias("delta")
    ChatMessage message;

    /**
     * The reason why GPT stopped generating, for example "length".
     */
    @JsonProperty("finish_reason")
    String finishReason;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy