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 Summary
Modifier and TypeMethodDescriptionbuild()clear()The number of tokens used for the conversation history in the prompt.The number of tokens used for the retrieved examples in the prompt.The total number of tokens used for the input to the LLM call.The total number of tokens used for the output of the LLM call.longThe number of tokens used for the conversation history in the prompt.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorlongThe number of tokens used for the retrieved examples in the prompt.longThe total number of tokens used for the input to the LLM call.longThe total number of tokens used for the output of the LLM call.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(LlmCall.TokenCount other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setConversationContextTokenCount(long value) The number of tokens used for the conversation history in the prompt.setExampleTokenCount(long value) The number of tokens used for the retrieved examples in the prompt.setTotalInputTokenCount(long value) The total number of tokens used for the input to the LLM call.setTotalOutputTokenCount(long value) The total number of tokens used for the output of the LLM call.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<LlmCall.TokenCount.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<LlmCall.TokenCount.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<LlmCall.TokenCount.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<LlmCall.TokenCount.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.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:
getTotalInputTokenCountin interfaceLlmCall.TokenCountOrBuilder- Returns:
- The totalInputTokenCount.
-
setTotalInputTokenCount
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
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:
getConversationContextTokenCountin interfaceLlmCall.TokenCountOrBuilder- Returns:
- The conversationContextTokenCount.
-
setConversationContextTokenCount
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
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:
getExampleTokenCountin interfaceLlmCall.TokenCountOrBuilder- Returns:
- The exampleTokenCount.
-
setExampleTokenCount
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
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:
getTotalOutputTokenCountin interfaceLlmCall.TokenCountOrBuilder- Returns:
- The totalOutputTokenCount.
-
setTotalOutputTokenCount
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
The total number of tokens used for the output of the LLM call.
int64 total_output_token_count = 5;- Returns:
- This builder for chaining.
-