rust-kgdb 0.5.6 → 0.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,12 +33,12 @@ async function basicEmbeddingExample() {
33
33
  for (const entity of entities) {
34
34
  // In production, use actual embedding providers
35
35
  const embedding = generateMockEmbedding(384, entity.id);
36
- embeddingService.storeEmbedding(entity.id, embedding);
36
+ embeddingService.storeVector(entity.id, embedding);
37
37
  console.log(`Stored embedding for ${entity.name} (${embedding.length} dims)`);
38
38
  }
39
39
 
40
40
  // Retrieve an embedding
41
- const appleEmbedding = embeddingService.getEmbedding('http://example.org/apple');
41
+ const appleEmbedding = embeddingService.getVector('http://example.org/apple');
42
42
  if (appleEmbedding) {
43
43
  console.log(`\nRetrieved Apple embedding: [${appleEmbedding.slice(0, 5).join(', ')}...]`);
44
44
  }
@@ -70,7 +70,7 @@ async function similaritySearchExample() {
70
70
  // Store embeddings with category-aware vectors
71
71
  for (const product of products) {
72
72
  const embedding = generateCategoryEmbedding(384, product.category, product.name);
73
- embeddingService.storeEmbedding(product.id, embedding);
73
+ embeddingService.storeVector(product.id, embedding);
74
74
  }
75
75
 
76
76
  console.log(`Indexed ${products.length} products\n`);
@@ -247,7 +247,7 @@ async function metricsExample() {
247
247
  for (let i = 0; i < 100; i++) {
248
248
  const entityId = `entity-${i}`;
249
249
  const embedding = generateMockEmbedding(384, entityId);
250
- embeddingService.storeEmbedding(entityId, embedding);
250
+ embeddingService.storeVector(entityId, embedding);
251
251
  }
252
252
 
253
253
  // Get service metrics