Class Completion

  • All Implemented Interfaces:

    
    public final class Completion
    
                        
    • Constructor Detail

    • Method Detail

      • id

         final String id()

        Unique object identifier.

        The format and length of IDs may change over time.

      • completion

         final String completion()

        The resulting completion up to and excluding the stop sequences.

      • model

         final Model model()

        The model that will complete your prompt.\n\nSee models for additional details and options.

      • stopReason

         final Optional<String> stopReason()

        The reason that we stopped.

        This may be one the following values:

        • "stop_sequence": we reached a stop sequence — either provided by you via the stop_sequences parameter, or a stop sequence built into the model

        • "max_tokens": we exceeded max_tokens_to_sample or the model's maximum

      • _type

         final JsonValue _type()

        Object type.

        For Text Completions, this is always "completion".

      • _id

         final JsonField<String> _id()

        Unique object identifier.

        The format and length of IDs may change over time.

      • _model

         final JsonField<Model> _model()

        The model that will complete your prompt.\n\nSee models for additional details and options.

      • _stopReason

         final JsonField<String> _stopReason()

        The reason that we stopped.

        This may be one the following values:

        • "stop_sequence": we reached a stop sequence — either provided by you via the stop_sequences parameter, or a stop sequence built into the model

        • "max_tokens": we exceeded max_tokens_to_sample or the model's maximum

      • builder

         final static Completion.Builder builder()

        Returns a mutable builder for constructing an instance of Completion.

        The following fields are required:

        .id()
        .completion()
        .model()
        .stopReason()