Struct google_api_proto::google::ai::generativelanguage::v1beta::retriever_service_client::RetrieverServiceClient
source · pub struct RetrieverServiceClient<T> { /* private fields */ }
Expand description
An API for semantic search over a corpus of user uploaded content.
Implementations§
source§impl<T> RetrieverServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> RetrieverServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> RetrieverServiceClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
sourcepub async fn create_corpus(
&mut self,
request: impl IntoRequest<CreateCorpusRequest>,
) -> Result<Response<Corpus>, Status>
pub async fn create_corpus( &mut self, request: impl IntoRequest<CreateCorpusRequest>, ) -> Result<Response<Corpus>, Status>
Creates an empty Corpus
.
sourcepub async fn get_corpus(
&mut self,
request: impl IntoRequest<GetCorpusRequest>,
) -> Result<Response<Corpus>, Status>
pub async fn get_corpus( &mut self, request: impl IntoRequest<GetCorpusRequest>, ) -> Result<Response<Corpus>, Status>
Gets information about a specific Corpus
.
sourcepub async fn update_corpus(
&mut self,
request: impl IntoRequest<UpdateCorpusRequest>,
) -> Result<Response<Corpus>, Status>
pub async fn update_corpus( &mut self, request: impl IntoRequest<UpdateCorpusRequest>, ) -> Result<Response<Corpus>, Status>
Updates a Corpus
.
sourcepub async fn delete_corpus(
&mut self,
request: impl IntoRequest<DeleteCorpusRequest>,
) -> Result<Response<()>, Status>
pub async fn delete_corpus( &mut self, request: impl IntoRequest<DeleteCorpusRequest>, ) -> Result<Response<()>, Status>
Deletes a Corpus
.
sourcepub async fn list_corpora(
&mut self,
request: impl IntoRequest<ListCorporaRequest>,
) -> Result<Response<ListCorporaResponse>, Status>
pub async fn list_corpora( &mut self, request: impl IntoRequest<ListCorporaRequest>, ) -> Result<Response<ListCorporaResponse>, Status>
Lists all Corpora
owned by the user.
sourcepub async fn query_corpus(
&mut self,
request: impl IntoRequest<QueryCorpusRequest>,
) -> Result<Response<QueryCorpusResponse>, Status>
pub async fn query_corpus( &mut self, request: impl IntoRequest<QueryCorpusRequest>, ) -> Result<Response<QueryCorpusResponse>, Status>
Performs semantic search over a Corpus
.
sourcepub async fn create_document(
&mut self,
request: impl IntoRequest<CreateDocumentRequest>,
) -> Result<Response<Document>, Status>
pub async fn create_document( &mut self, request: impl IntoRequest<CreateDocumentRequest>, ) -> Result<Response<Document>, Status>
Creates an empty Document
.
sourcepub async fn get_document(
&mut self,
request: impl IntoRequest<GetDocumentRequest>,
) -> Result<Response<Document>, Status>
pub async fn get_document( &mut self, request: impl IntoRequest<GetDocumentRequest>, ) -> Result<Response<Document>, Status>
Gets information about a specific Document
.
sourcepub async fn update_document(
&mut self,
request: impl IntoRequest<UpdateDocumentRequest>,
) -> Result<Response<Document>, Status>
pub async fn update_document( &mut self, request: impl IntoRequest<UpdateDocumentRequest>, ) -> Result<Response<Document>, Status>
Updates a Document
.
sourcepub async fn delete_document(
&mut self,
request: impl IntoRequest<DeleteDocumentRequest>,
) -> Result<Response<()>, Status>
pub async fn delete_document( &mut self, request: impl IntoRequest<DeleteDocumentRequest>, ) -> Result<Response<()>, Status>
Deletes a Document
.
sourcepub async fn list_documents(
&mut self,
request: impl IntoRequest<ListDocumentsRequest>,
) -> Result<Response<ListDocumentsResponse>, Status>
pub async fn list_documents( &mut self, request: impl IntoRequest<ListDocumentsRequest>, ) -> Result<Response<ListDocumentsResponse>, Status>
Lists all Document
s in a Corpus
.
sourcepub async fn query_document(
&mut self,
request: impl IntoRequest<QueryDocumentRequest>,
) -> Result<Response<QueryDocumentResponse>, Status>
pub async fn query_document( &mut self, request: impl IntoRequest<QueryDocumentRequest>, ) -> Result<Response<QueryDocumentResponse>, Status>
Performs semantic search over a Document
.
sourcepub async fn create_chunk(
&mut self,
request: impl IntoRequest<CreateChunkRequest>,
) -> Result<Response<Chunk>, Status>
pub async fn create_chunk( &mut self, request: impl IntoRequest<CreateChunkRequest>, ) -> Result<Response<Chunk>, Status>
Creates a Chunk
.
sourcepub async fn batch_create_chunks(
&mut self,
request: impl IntoRequest<BatchCreateChunksRequest>,
) -> Result<Response<BatchCreateChunksResponse>, Status>
pub async fn batch_create_chunks( &mut self, request: impl IntoRequest<BatchCreateChunksRequest>, ) -> Result<Response<BatchCreateChunksResponse>, Status>
Batch create Chunk
s.
sourcepub async fn get_chunk(
&mut self,
request: impl IntoRequest<GetChunkRequest>,
) -> Result<Response<Chunk>, Status>
pub async fn get_chunk( &mut self, request: impl IntoRequest<GetChunkRequest>, ) -> Result<Response<Chunk>, Status>
Gets information about a specific Chunk
.
sourcepub async fn update_chunk(
&mut self,
request: impl IntoRequest<UpdateChunkRequest>,
) -> Result<Response<Chunk>, Status>
pub async fn update_chunk( &mut self, request: impl IntoRequest<UpdateChunkRequest>, ) -> Result<Response<Chunk>, Status>
Updates a Chunk
.
sourcepub async fn batch_update_chunks(
&mut self,
request: impl IntoRequest<BatchUpdateChunksRequest>,
) -> Result<Response<BatchUpdateChunksResponse>, Status>
pub async fn batch_update_chunks( &mut self, request: impl IntoRequest<BatchUpdateChunksRequest>, ) -> Result<Response<BatchUpdateChunksResponse>, Status>
Batch update Chunk
s.
sourcepub async fn delete_chunk(
&mut self,
request: impl IntoRequest<DeleteChunkRequest>,
) -> Result<Response<()>, Status>
pub async fn delete_chunk( &mut self, request: impl IntoRequest<DeleteChunkRequest>, ) -> Result<Response<()>, Status>
Deletes a Chunk
.
sourcepub async fn batch_delete_chunks(
&mut self,
request: impl IntoRequest<BatchDeleteChunksRequest>,
) -> Result<Response<()>, Status>
pub async fn batch_delete_chunks( &mut self, request: impl IntoRequest<BatchDeleteChunksRequest>, ) -> Result<Response<()>, Status>
Batch delete Chunk
s.
sourcepub async fn list_chunks(
&mut self,
request: impl IntoRequest<ListChunksRequest>,
) -> Result<Response<ListChunksResponse>, Status>
pub async fn list_chunks( &mut self, request: impl IntoRequest<ListChunksRequest>, ) -> Result<Response<ListChunksResponse>, Status>
Lists all Chunk
s in a Document
.
Trait Implementations§
source§impl<T: Clone> Clone for RetrieverServiceClient<T>
impl<T: Clone> Clone for RetrieverServiceClient<T>
source§fn clone(&self) -> RetrieverServiceClient<T>
fn clone(&self) -> RetrieverServiceClient<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<T> !Freeze for RetrieverServiceClient<T>
impl<T> RefUnwindSafe for RetrieverServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for RetrieverServiceClient<T>where
T: Send,
impl<T> Sync for RetrieverServiceClient<T>where
T: Sync,
impl<T> Unpin for RetrieverServiceClient<T>where
T: Unpin,
impl<T> UnwindSafe for RetrieverServiceClient<T>where
T: UnwindSafe,
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