Class: Google::Apis::DialogflowV3beta1::GoogleCloudDialogflowCxV3beta1LlmCallTokenCount
- Inherits:
-
Object
- Object
- Google::Apis::DialogflowV3beta1::GoogleCloudDialogflowCxV3beta1LlmCallTokenCount
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/dialogflow_v3beta1/classes.rb,
lib/google/apis/dialogflow_v3beta1/representations.rb,
lib/google/apis/dialogflow_v3beta1/representations.rb
Overview
Stores token counts of the LLM call.
Instance Attribute Summary collapse
-
#conversation_context_token_count ⇒ Fixnum
The number of tokens used for the conversation history in the prompt.
-
#example_token_count ⇒ Fixnum
The number of tokens used for the retrieved examples in the prompt.
-
#total_input_token_count ⇒ Fixnum
The total number of tokens used for the input to the LLM call.
-
#total_output_token_count ⇒ Fixnum
The total number of tokens used for the output of the LLM call.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDialogflowCxV3beta1LlmCallTokenCount
constructor
A new instance of GoogleCloudDialogflowCxV3beta1LlmCallTokenCount.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDialogflowCxV3beta1LlmCallTokenCount
Returns a new instance of GoogleCloudDialogflowCxV3beta1LlmCallTokenCount.
10969 10970 10971 |
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 10969 def initialize(**args) update!(**args) end |
Instance Attribute Details
#conversation_context_token_count ⇒ Fixnum
The number of tokens used for the conversation history in the prompt.
Corresponds to the JSON property conversationContextTokenCount
10952 10953 10954 |
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 10952 def conversation_context_token_count @conversation_context_token_count end |
#example_token_count ⇒ Fixnum
The number of tokens used for the retrieved examples in the prompt.
Corresponds to the JSON property exampleTokenCount
10957 10958 10959 |
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 10957 def example_token_count @example_token_count end |
#total_input_token_count ⇒ Fixnum
The total number of tokens used for the input to the LLM call.
Corresponds to the JSON property totalInputTokenCount
10962 10963 10964 |
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 10962 def total_input_token_count @total_input_token_count end |
#total_output_token_count ⇒ Fixnum
The total number of tokens used for the output of the LLM call.
Corresponds to the JSON property totalOutputTokenCount
10967 10968 10969 |
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 10967 def total_output_token_count @total_output_token_count end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
10974 10975 10976 10977 10978 10979 |
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 10974 def update!(**args) @conversation_context_token_count = args[:conversation_context_token_count] if args.key?(:conversation_context_token_count) @example_token_count = args[:example_token_count] if args.key?(:example_token_count) @total_input_token_count = args[:total_input_token_count] if args.key?(:total_input_token_count) @total_output_token_count = args[:total_output_token_count] if args.key?(:total_output_token_count) end |