Class KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder (4.100.0)

public static final class KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder extends GeneratedMessage.Builder<KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder> implements KnowledgeAssistDebugInfo.QueryGenerationDebugInfoOrBuilder

Token usage metadata for query generation.

Protobuf type google.cloud.dialogflow.v2beta1.KnowledgeAssistDebugInfo.QueryGenerationDebugInfo

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public KnowledgeAssistDebugInfo.QueryGenerationDebugInfo build()
Returns
Type Description
KnowledgeAssistDebugInfo.QueryGenerationDebugInfo

buildPartial()

public KnowledgeAssistDebugInfo.QueryGenerationDebugInfo buildPartial()
Returns
Type Description
KnowledgeAssistDebugInfo.QueryGenerationDebugInfo

clear()

public KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder clear()
Returns
Type Description
KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder
Overrides

clearCandidatesTokenCount()

public KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder clearCandidatesTokenCount()

The total number of tokens in the generated candidates.

int32 candidates_token_count = 2;

Returns
Type Description
KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder

This builder for chaining.

clearPromptTokenCount()

public KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder clearPromptTokenCount()

The total number of tokens in the prompt.

int32 prompt_token_count = 1;

Returns
Type Description
KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder

This builder for chaining.

clearTotalTokenCount()

public KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder clearTotalTokenCount()

The total number of tokens for the entire request.

int32 total_token_count = 3;

Returns
Type Description
KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder

This builder for chaining.

getCandidatesTokenCount()

public int getCandidatesTokenCount()

The total number of tokens in the generated candidates.

int32 candidates_token_count = 2;

Returns
Type Description
int

The candidatesTokenCount.

getDefaultInstanceForType()

public KnowledgeAssistDebugInfo.QueryGenerationDebugInfo getDefaultInstanceForType()
Returns
Type Description
KnowledgeAssistDebugInfo.QueryGenerationDebugInfo

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getPromptTokenCount()

public int getPromptTokenCount()

The total number of tokens in the prompt.

int32 prompt_token_count = 1;

Returns
Type Description
int

The promptTokenCount.

getTotalTokenCount()

public int getTotalTokenCount()

The total number of tokens for the entire request.

int32 total_token_count = 3;

Returns
Type Description
int

The totalTokenCount.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(KnowledgeAssistDebugInfo.QueryGenerationDebugInfo other)

public KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder mergeFrom(KnowledgeAssistDebugInfo.QueryGenerationDebugInfo other)
Parameter
Name Description
other KnowledgeAssistDebugInfo.QueryGenerationDebugInfo
Returns
Type Description
KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder
Overrides

setCandidatesTokenCount(int value)

public KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder setCandidatesTokenCount(int value)

The total number of tokens in the generated candidates.

int32 candidates_token_count = 2;

Parameter
Name Description
value int

The candidatesTokenCount to set.

Returns
Type Description
KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder

This builder for chaining.

setPromptTokenCount(int value)

public KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder setPromptTokenCount(int value)

The total number of tokens in the prompt.

int32 prompt_token_count = 1;

Parameter
Name Description
value int

The promptTokenCount to set.

Returns
Type Description
KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder

This builder for chaining.

setTotalTokenCount(int value)

public KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder setTotalTokenCount(int value)

The total number of tokens for the entire request.

int32 total_token_count = 3;

Parameter
Name Description
value int

The totalTokenCount to set.

Returns
Type Description
KnowledgeAssistDebugInfo.QueryGenerationDebugInfo.Builder

This builder for chaining.