CountTokensRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)Request message for PredictionService.CountTokens.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes |
|
|---|---|
| Name | Description |
endpoint |
str
Required. The name of the Endpoint requested to perform token counting. Format: projects/{project}/locations/{location}/endpoints/{endpoint}
|
model |
str
Optional. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*
|
instances |
MutableSequence[google.protobuf.struct_pb2.Value]
Optional. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model. |
contents |
MutableSequence[google.cloud.aiplatform_v1beta1.types.Content]
Optional. Input content. |
system_instruction |
google.cloud.aiplatform_v1beta1.types.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. This field is a member of oneof_ _system_instruction.
|
tools |
MutableSequence[google.cloud.aiplatform_v1beta1.types.Tool]
Optional. A list of Tools the model may use to generate
the next response.
A Tool is a piece of code that enables the system to
interact with external systems to perform an action, or set
of actions, outside of knowledge and scope of the model.
|
generation_config |
google.cloud.aiplatform_v1beta1.types.GenerationConfig
Optional. Generation config that the model will use to generate the response. This field is a member of oneof_ _generation_config.
|
Methods
CountTokensRequest
CountTokensRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)Request message for PredictionService.CountTokens.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields