Struct google_api_proto::google::cloud::aiplatform::v1::CountTokensRequest
source · pub struct CountTokensRequest {
pub endpoint: String,
pub model: String,
pub instances: Vec<Value>,
pub contents: Vec<Content>,
pub system_instruction: Option<Content>,
pub tools: Vec<Tool>,
}
Expand description
Request message for [PredictionService.CountTokens][].
Fields§
§endpoint: String
Required. The name of the Endpoint requested to perform token counting.
Format:
projects/{project}/locations/{location}/endpoints/{endpoint}
model: String
Optional. The name of the publisher model requested to serve the
prediction. Format:
projects/{project}/locations/{location}/publishers/*/models/*
instances: Vec<Value>
Optional. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
contents: Vec<Content>
Optional. Input content.
system_instruction: Option<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.
tools: Vec<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.
Trait Implementations§
source§impl Clone for CountTokensRequest
impl Clone for CountTokensRequest
source§fn clone(&self) -> CountTokensRequest
fn clone(&self) -> CountTokensRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CountTokensRequest
impl Debug for CountTokensRequest
source§impl Default for CountTokensRequest
impl Default for CountTokensRequest
source§impl Message for CountTokensRequest
impl Message for CountTokensRequest
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for CountTokensRequest
impl PartialEq for CountTokensRequest
source§fn eq(&self, other: &CountTokensRequest) -> bool
fn eq(&self, other: &CountTokensRequest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CountTokensRequest
Auto Trait Implementations§
impl Freeze for CountTokensRequest
impl RefUnwindSafe for CountTokensRequest
impl Send for CountTokensRequest
impl Sync for CountTokensRequest
impl Unpin for CountTokensRequest
impl UnwindSafe for CountTokensRequest
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request