Class LlmCall.TokenCount.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<LlmCall.TokenCount.Builder>
com.google.cloud.dialogflow.cx.v3beta1.LlmCall.TokenCount.Builder
All Implemented Interfaces:
LlmCall.TokenCountOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
LlmCall.TokenCount

public static final class LlmCall.TokenCount.Builder extends com.google.protobuf.GeneratedMessage.Builder<LlmCall.TokenCount.Builder> implements LlmCall.TokenCountOrBuilder
 Stores token counts of the LLM call.
 
Protobuf type google.cloud.dialogflow.cx.v3beta1.LlmCall.TokenCount
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<LlmCall.TokenCount.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<LlmCall.TokenCount.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<LlmCall.TokenCount.Builder>
    • getDefaultInstanceForType

      public LlmCall.TokenCount getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public LlmCall.TokenCount build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public LlmCall.TokenCount buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public LlmCall.TokenCount.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<LlmCall.TokenCount.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<LlmCall.TokenCount.Builder>
    • mergeFrom

      public LlmCall.TokenCount.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<LlmCall.TokenCount.Builder>
      Throws:
      IOException
    • getTotalInputTokenCount

      public long getTotalInputTokenCount()
       The total number of tokens used for the input to the LLM call.
       
      int64 total_input_token_count = 1;
      Specified by:
      getTotalInputTokenCount in interface LlmCall.TokenCountOrBuilder
      Returns:
      The totalInputTokenCount.
    • setTotalInputTokenCount

      public LlmCall.TokenCount.Builder setTotalInputTokenCount(long value)
       The total number of tokens used for the input to the LLM call.
       
      int64 total_input_token_count = 1;
      Parameters:
      value - The totalInputTokenCount to set.
      Returns:
      This builder for chaining.
    • clearTotalInputTokenCount

      public LlmCall.TokenCount.Builder clearTotalInputTokenCount()
       The total number of tokens used for the input to the LLM call.
       
      int64 total_input_token_count = 1;
      Returns:
      This builder for chaining.
    • getConversationContextTokenCount

      public long getConversationContextTokenCount()
       The number of tokens used for the conversation history in the prompt.
       
      int64 conversation_context_token_count = 3;
      Specified by:
      getConversationContextTokenCount in interface LlmCall.TokenCountOrBuilder
      Returns:
      The conversationContextTokenCount.
    • setConversationContextTokenCount

      public LlmCall.TokenCount.Builder setConversationContextTokenCount(long value)
       The number of tokens used for the conversation history in the prompt.
       
      int64 conversation_context_token_count = 3;
      Parameters:
      value - The conversationContextTokenCount to set.
      Returns:
      This builder for chaining.
    • clearConversationContextTokenCount

      public LlmCall.TokenCount.Builder clearConversationContextTokenCount()
       The number of tokens used for the conversation history in the prompt.
       
      int64 conversation_context_token_count = 3;
      Returns:
      This builder for chaining.
    • getExampleTokenCount

      public long getExampleTokenCount()
       The number of tokens used for the retrieved examples in the prompt.
       
      int64 example_token_count = 4;
      Specified by:
      getExampleTokenCount in interface LlmCall.TokenCountOrBuilder
      Returns:
      The exampleTokenCount.
    • setExampleTokenCount

      public LlmCall.TokenCount.Builder setExampleTokenCount(long value)
       The number of tokens used for the retrieved examples in the prompt.
       
      int64 example_token_count = 4;
      Parameters:
      value - The exampleTokenCount to set.
      Returns:
      This builder for chaining.
    • clearExampleTokenCount

      public LlmCall.TokenCount.Builder clearExampleTokenCount()
       The number of tokens used for the retrieved examples in the prompt.
       
      int64 example_token_count = 4;
      Returns:
      This builder for chaining.
    • getTotalOutputTokenCount

      public long getTotalOutputTokenCount()
       The total number of tokens used for the output of the LLM call.
       
      int64 total_output_token_count = 5;
      Specified by:
      getTotalOutputTokenCount in interface LlmCall.TokenCountOrBuilder
      Returns:
      The totalOutputTokenCount.
    • setTotalOutputTokenCount

      public LlmCall.TokenCount.Builder setTotalOutputTokenCount(long value)
       The total number of tokens used for the output of the LLM call.
       
      int64 total_output_token_count = 5;
      Parameters:
      value - The totalOutputTokenCount to set.
      Returns:
      This builder for chaining.
    • clearTotalOutputTokenCount

      public LlmCall.TokenCount.Builder clearTotalOutputTokenCount()
       The total number of tokens used for the output of the LLM call.
       
      int64 total_output_token_count = 5;
      Returns:
      This builder for chaining.