Class Choice.Builder

  • Enclosing class:
    Choice

    public static class Choice.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • index

        public Choice.Builder index​(Integer index)
        The index of the generated text.
        Parameters:
        index - the value to set
        Returns:
        this builder
      • text

        public Choice.Builder text​(String text)
        The generated text.
        Parameters:
        text - the value to set
        Returns:
        this builder
      • finishReason

        public Choice.Builder finishReason​(String finishReason)
        The reason why the model stopped generating tokens.

        Stops if the model hits a natural stop point or a provided stop sequence. Returns the length if the tokens reach the specified maximum number of tokens.

        Parameters:
        finishReason - the value to set
        Returns:
        this builder
      • build

        public Choice build()