MCPcopy Create free account
hub / github.com/Rustixir/darkbird / vec_insert

Method vec_insert

src/darkbird/database.rs:36–43  ·  view source on GitHub ↗
(&self, vector_id: VectorId, vector: Vec<f32>)

Source from the content-addressed store, hash-verified

34
35 #[inline]
36 pub async fn vec_insert(&self, vector_id: VectorId, vector: Vec<f32>) -> Result<(), SessionResult> {
37 match self.datastores.get::<VecStorage>() {
38 None => Err(SessionResult::DataStoreNotFound),
39 Some(datastore) => {
40 datastore.insert(vector_id, vector).await
41 }
42 }
43 }
44
45 #[inline]
46 pub async fn vec_insert_with_uuid(&self, vector: Vec<f32>) -> Result<(), SessionResult> {

Callers 2

mainFunction · 0.80
k_nearest_neighborsFunction · 0.80

Calls 1

insertMethod · 0.45

Tested by 1

k_nearest_neighborsFunction · 0.64