CountTokensRequest class final

Request message for PredictionService.CountTokens.

Constructors

CountTokensRequest({required String endpoint, String model = '', List<Value> instances = const [], List<Content> contents = const [], Content? systemInstruction, List<Tool> tools = const [], GenerationConfig? generationConfig})
CountTokensRequest.fromJson(Object? j)
factory

Properties

contents → List<Content>
Optional. Input content.
final
endpoint → String
Required. The name of the Endpoint requested to perform token counting. Format: projects/{project}/locations/{location}/endpoints/{endpoint}
final
generationConfig → GenerationConfig?
Optional. Generation config that the model will use to generate the response.
final
hashCode → int
The hash code for this object.
no setterinherited
instances → List<Value>
Optional. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
final
model → String
Optional. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*
final
qualifiedName → String
The fully qualified name of this message, i.e., google.protobuf.Duration or google.rpc.ErrorInfo.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
systemInstruction → Content?
Optional. The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph.
final
tools → List<Tool>
Optional. A list of Tools the model may use to generate the next response.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Object
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

fullyQualifiedName → const String