pub struct GeminiClient {
pub model: Model,
/* private fields */
}Expand description
Internal client for making requests to the Gemini API
Fields§
§model: ModelImplementations§
Source§impl GeminiClient
impl GeminiClient
pub async fn create_file_search_store( &self, request: CreateFileSearchStoreRequest, ) -> Result<FileSearchStore, Error>
pub async fn get_file_search_store( &self, name: &str, ) -> Result<FileSearchStore, Error>
pub async fn list_file_search_stores( &self, page_size: Option<u32>, page_token: Option<&str>, ) -> Result<ListFileSearchStoresResponse, Error>
pub async fn delete_file_search_store( &self, name: &str, force: bool, ) -> Result<(), Error>
pub async fn upload_to_file_search_store( &self, store_name: &str, file_data: Vec<u8>, display_name: Option<String>, mime_type: Option<Mime>, custom_metadata: Option<Vec<CustomMetadata>>, chunking_config: Option<ChunkingConfig>, ) -> Result<Operation, Error>
pub async fn import_file_to_search_store( &self, store_name: &str, request: ImportFileRequest, ) -> Result<Operation, Error>
pub async fn get_document( &self, store_name: &str, document_id: &str, ) -> Result<Document, Error>
pub async fn list_documents( &self, store_name: &str, page_size: Option<u32>, page_token: Option<&str>, ) -> Result<ListDocumentsResponse, Error>
pub async fn delete_document( &self, store_name: &str, document_id: &str, force: bool, ) -> Result<(), Error>
pub async fn get_operation(&self, name: &str) -> Result<Operation, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GeminiClient
impl !RefUnwindSafe for GeminiClient
impl Send for GeminiClient
impl Sync for GeminiClient
impl Unpin for GeminiClient
impl !UnwindSafe for GeminiClient
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
Mutably borrows from an owned value. Read more