Class ChatChoice

java.lang.Object
com.azure.ai.openai.models.ChatChoice

public final class ChatChoice extends Object
The representation of a single prompt completion as part of an overall chat completions request. Generally, `n` choices are generated per provided prompt with a default value of 1. Token limits and other settings may limit the number of choices generated.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the contentFilterResults property: Information about the content filtering category (hate, sexual, violence, self_harm), if it has been detected, as well as the severity level (very_low, low, medium, high-scale that determines the intensity and risk level of harmful content) and if it has been filtered or not.
    Get the delta property: The delta message content for a streaming response.
    Get the finishReason property: The reason that this chat completions choice completed its generated.
    int
    Get the index property: The ordered index associated with this chat completions choice.
    Get the message property: The chat message for a given chat completions prompt.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getMessage

      public ChatMessage getMessage()
      Get the message property: The chat message for a given chat completions prompt.
      Returns:
      the message value.
    • getIndex

      public int getIndex()
      Get the index property: The ordered index associated with this chat completions choice.
      Returns:
      the index value.
    • getFinishReason

      public CompletionsFinishReason getFinishReason()
      Get the finishReason property: The reason that this chat completions choice completed its generated.
      Returns:
      the finishReason value.
    • getDelta

      public ChatMessage getDelta()
      Get the delta property: The delta message content for a streaming response.
      Returns:
      the delta value.
    • getContentFilterResults

      public ContentFilterResults getContentFilterResults()
      Get the contentFilterResults property: Information about the content filtering category (hate, sexual, violence, self_harm), if it has been detected, as well as the severity level (very_low, low, medium, high-scale that determines the intensity and risk level of harmful content) and if it has been filtered or not.
      Returns:
      the contentFilterResults value.