Struct VectorDBClient

Source
pub struct VectorDBClient { /* private fields */ }
Expand description

VectorDB gRPC client

Implementations§

Source§

impl VectorDBClient

Source

pub async fn new(config: ClientConfig) -> Result<Self>

Create a new VectorDB client with the given configuration

Source

pub async fn default() -> Result<Self>

Create a new client with default configuration

Source

pub async fn connect<S: Into<String>>(address: S) -> Result<Self>

Create a new client connected to the given address

Source

pub async fn get_server_info(&mut self) -> Result<ServerInfo>

Get server information

Source

pub async fn create_collection( &mut self, name: String, vector_size: i32, distance: String, ) -> Result<StatusResponse>

Create a new collection

Source

pub async fn list_collections(&mut self) -> Result<ListCollectionsResponse>

List all collections

Source

pub async fn delete_collection( &mut self, name: String, ) -> Result<StatusResponse>

Delete a collection

Source

pub async fn clear_collection(&mut self, name: String) -> Result<StatusResponse>

Clear a collection (delete and recreate empty)

Source

pub async fn index_files( &mut self, collection_name: String, paths: Vec<String>, extensions: Vec<String>, ) -> Result<IndexResponse>

Index files or directories into a collection

Source

pub async fn query_collection( &mut self, collection_name: String, query_text: String, limit: i32, language: Option<String>, element_type: Option<String>, ) -> Result<QueryResponse>

Query a collection for similar documents

Source

pub async fn add_repository( &mut self, url: String, local_path: Option<String>, name: Option<String>, branch: Option<String>, remote: Option<String>, ssh_key_path: Option<String>, ssh_passphrase: Option<String>, ) -> Result<StatusResponse>

Add a repository to be managed

Source

pub async fn list_repositories(&mut self) -> Result<ListRepositoriesResponse>

List all managed repositories

Source

pub async fn use_repository(&mut self, name: String) -> Result<StatusResponse>

Set the active repository

Source

pub async fn remove_repository( &mut self, name: String, skip_confirmation: bool, ) -> Result<StatusResponse>

Remove a repository

Source

pub async fn sync_repository( &mut self, name: Option<String>, extensions: Vec<String>, force: bool, ) -> Result<StatusResponse>

Synchronize a repository

Source

pub async fn use_branch( &mut self, branch_name: String, repository_name: Option<String>, ) -> Result<StatusResponse>

Set the active branch

Source

pub async fn edit_file_by_lines( &mut self, file_path: String, start_line: u32, end_line: u32, content: String, format: bool, update_references: bool, ) -> Result<EditCodeResponse>

Apply an edit to a file using line-based targeting

Source

pub async fn edit_file_by_element( &mut self, file_path: String, element_query: String, content: String, format: bool, update_references: bool, ) -> Result<EditCodeResponse>

Apply an edit to a file using semantic element targeting

Source

pub async fn validate_edit_by_lines( &mut self, file_path: String, start_line: u32, end_line: u32, content: String, format: bool, update_references: bool, ) -> Result<Vec<ValidationIssueInfo>>

Validate an edit without applying it (line-based targeting)

Source

pub async fn validate_edit_by_element( &mut self, file_path: String, element_query: String, content: String, format: bool, update_references: bool, ) -> Result<Vec<ValidationIssueInfo>>

Validate an edit without applying it (semantic element targeting)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more