pub struct GoogleCloudAiplatformV1CountTokensRequest {
pub model: Option<String>,
pub instances: Option<Vec<Value>>,
pub tools: Option<Vec<GoogleCloudAiplatformV1Tool>>,
pub contents: Option<Vec<GoogleCloudAiplatformV1Content>>,
pub system_instruction: Option<GoogleCloudAiplatformV1Content>,
}Expand description
Request message for PredictionService.CountTokens.
§Activities
This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).
Fields§
§model: Option<String>Optional. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*
instances: Option<Vec<Value>>Optional. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
tools: Option<Vec<GoogleCloudAiplatformV1Tool>>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.
contents: Option<Vec<GoogleCloudAiplatformV1Content>>Optional. Input content.
system_instruction: Option<GoogleCloudAiplatformV1Content>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.
Trait Implementations§
Source§impl Clone for GoogleCloudAiplatformV1CountTokensRequest
impl Clone for GoogleCloudAiplatformV1CountTokensRequest
Source§fn clone(&self) -> GoogleCloudAiplatformV1CountTokensRequest
fn clone(&self) -> GoogleCloudAiplatformV1CountTokensRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for GoogleCloudAiplatformV1CountTokensRequest
impl Default for GoogleCloudAiplatformV1CountTokensRequest
Source§fn default() -> GoogleCloudAiplatformV1CountTokensRequest
fn default() -> GoogleCloudAiplatformV1CountTokensRequest
Source§impl<'de> Deserialize<'de> for GoogleCloudAiplatformV1CountTokensRequest
impl<'de> Deserialize<'de> for GoogleCloudAiplatformV1CountTokensRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl RequestValue for GoogleCloudAiplatformV1CountTokensRequest
Auto Trait Implementations§
impl Freeze for GoogleCloudAiplatformV1CountTokensRequest
impl RefUnwindSafe for GoogleCloudAiplatformV1CountTokensRequest
impl Send for GoogleCloudAiplatformV1CountTokensRequest
impl Sync for GoogleCloudAiplatformV1CountTokensRequest
impl Unpin for GoogleCloudAiplatformV1CountTokensRequest
impl UnwindSafe for GoogleCloudAiplatformV1CountTokensRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more