Struct google_api_proto::google::ai::generativelanguage::v1beta::Chunk
source · pub struct Chunk {
pub name: String,
pub data: Option<ChunkData>,
pub custom_metadata: Vec<CustomMetadata>,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub state: i32,
}Expand description
A Chunk is a subpart of a Document that is treated as an independent unit
for the purposes of vector representation and storage.
A Corpus can have a maximum of 1 million Chunks.
Fields§
§name: StringImmutable. Identifier. The Chunk resource name. The ID (name excluding
the “corpora//documents//chunks/” prefix) can contain up to 40 characters
that are lowercase alphanumeric or dashes (-). The ID cannot start or end
with a dash. If the name is empty on create, a random 12-character unique
ID will be generated.
Example: corpora/{corpus_id}/documents/{document_id}/chunks/123a456b789c
data: Option<ChunkData>Required. The content for the Chunk, such as the text string.
The maximum number of tokens per chunk is 2043.
custom_metadata: Vec<CustomMetadata>Optional. User provided custom metadata stored as key-value pairs.
The maximum number of CustomMetadata per chunk is 20.
create_time: Option<Timestamp>Output only. The Timestamp of when the Chunk was created.
update_time: Option<Timestamp>Output only. The Timestamp of when the Chunk was last updated.
state: i32Output only. Current state of the Chunk.
Implementations§
Trait Implementations§
source§impl Message for Chunk
impl Message for Chunk
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 Chunk
impl PartialEq for Chunk
impl StructuralPartialEq for Chunk
Auto Trait Implementations§
impl Freeze for Chunk
impl RefUnwindSafe for Chunk
impl Send for Chunk
impl Sync for Chunk
impl Unpin for Chunk
impl UnwindSafe for Chunk
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