@toolpack-sdk/knowledge 2.0.0-alpha.1 → 2.1.0

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.
package/README.md CHANGED
@@ -452,6 +452,27 @@ new OpenAIEmbedder({
452
452
  })
453
453
  ```
454
454
 
455
+ ### VertexAIEmbedder
456
+
457
+ Google Cloud Vertex AI embedding models. Authenticates via [Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials).
458
+
459
+ ```typescript
460
+ import { VertexAIEmbedder } from '@toolpack-sdk/knowledge';
461
+
462
+ new VertexAIEmbedder({
463
+ projectId: 'my-gcp-project', // Required (or set VERTEX_AI_PROJECT / GOOGLE_CLOUD_PROJECT env var)
464
+ location: 'us-central1', // GCP region (default: 'us-central1')
465
+ model: 'gemini-embedding-001', // Embedding model (default: 'gemini-embedding-001')
466
+ outputDimensionality: 3072, // Optional: override output dimensions
467
+ retries: 3, // default
468
+ retryDelay: 1000, // ms, default
469
+ })
470
+ ```
471
+
472
+ If `projectId` is not set in options, the embedder falls back to the `VERTEX_AI_PROJECT`, `TOOLPACK_VERTEXAI_PROJECT`, or `GOOGLE_CLOUD_PROJECT` environment variables.
473
+
474
+ Known models: `gemini-embedding-001` (3072), `text-embedding-005` (768), `text-multilingual-embedding-002` (768). Pass `outputDimensionality` for any other model.
475
+
455
476
  ## API Reference
456
477
 
457
478
  ### Knowledge.create()