@mastra/mcp-docs-server 1.0.0-beta.4 → 1.0.0-beta.5
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/.docs/organized/changelogs/%40internal%2Fstorage-test-utils.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fastra.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fchroma.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +326 -126
- package/.docs/organized/changelogs/%40mastra%2Fcouchbase.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloudflare.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-netlify.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-vercel.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fevals.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Flance.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Flibsql.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Floggers.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp-registry-registry.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmcp.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmemory.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fmssql.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fopensearch.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fpg.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fpinecone.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fqdrant.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Frag.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Freact.md +80 -1
- package/.docs/organized/changelogs/%40mastra%2Fs3vectors.md +9 -0
- package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +36 -0
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fturbopuffer.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fupstash.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvectorize.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-azure.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-cloudflare.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-deepgram.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-elevenlabs.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-gladia.md +92 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google-gemini-live.md +67 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-google.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-murf.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai-realtime.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-openai.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-playai.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-sarvam.md +201 -1
- package/.docs/organized/changelogs/%40mastra%2Fvoice-speechify.md +201 -1
- package/.docs/organized/changelogs/create-mastra.md +201 -1
- package/.docs/organized/changelogs/mastra.md +201 -1
- package/.docs/organized/code-examples/memory-with-processors.md +1 -1
- package/.docs/organized/code-examples/quick-start.md +1 -1
- package/.docs/raw/agents/adding-voice.mdx +7 -10
- package/.docs/raw/agents/guardrails.mdx +19 -20
- package/.docs/raw/agents/human-in-the-loop-with-tools.mdx +6 -5
- package/.docs/raw/agents/networks.mdx +1 -2
- package/.docs/raw/agents/overview.mdx +5 -5
- package/.docs/raw/agents/using-tools.mdx +4 -5
- package/.docs/raw/course/01-first-agent/05-running-playground.md +5 -5
- package/.docs/raw/course/01-first-agent/09-testing-your-agent.md +3 -3
- package/.docs/raw/course/01-first-agent/13-testing-your-tool.md +3 -3
- package/.docs/raw/course/01-first-agent/17-testing-memory.md +2 -2
- package/.docs/raw/course/04-workflows/07-using-playground.md +1 -1
- package/.docs/raw/deployment/building-mastra.mdx +1 -1
- package/.docs/raw/deployment/cloud-providers/amazon-ec2.mdx +1 -1
- package/.docs/raw/deployment/cloud-providers/aws-lambda.mdx +1 -1
- package/.docs/raw/deployment/cloud-providers/azure-app-services.mdx +1 -1
- package/.docs/raw/deployment/cloud-providers/digital-ocean.mdx +1 -1
- package/.docs/raw/deployment/cloud-providers/index.mdx +1 -1
- package/.docs/raw/deployment/mastra-cloud/observability.mdx +19 -17
- package/.docs/raw/deployment/mastra-cloud/setting-up.mdx +1 -1
- package/.docs/raw/deployment/overview.mdx +2 -2
- package/.docs/raw/deployment/web-framework.mdx +5 -5
- package/.docs/raw/evals/custom-scorers.mdx +3 -5
- package/.docs/raw/evals/overview.mdx +2 -3
- package/.docs/raw/getting-started/project-structure.mdx +1 -1
- package/.docs/raw/getting-started/start.mdx +72 -0
- package/.docs/raw/getting-started/studio.mdx +1 -1
- package/.docs/raw/{frameworks/agentic-uis/ai-sdk.mdx → guides/build-your-ui/ai-sdk-ui.mdx} +105 -11
- package/.docs/raw/{frameworks/web-frameworks → guides/getting-started}/astro.mdx +23 -25
- package/.docs/raw/{frameworks/servers → guides/getting-started}/express.mdx +3 -4
- package/.docs/raw/guides/{guide → getting-started}/manual-install.mdx +1 -1
- package/.docs/raw/guides/{quickstarts/nextjs.mdx → getting-started/next-js.mdx} +11 -11
- package/.docs/raw/guides/{quickstarts/standalone-server.mdx → getting-started/quickstart.mdx} +7 -7
- package/.docs/raw/{frameworks/web-frameworks → guides/getting-started}/sveltekit.mdx +23 -25
- package/.docs/raw/{frameworks/web-frameworks → guides/getting-started}/vite-react.mdx +7 -7
- package/.docs/raw/guides/guide/ai-recruiter.mdx +2 -3
- package/.docs/raw/guides/guide/chef-michel.mdx +2 -3
- package/.docs/raw/guides/guide/notes-mcp-server.mdx +2 -2
- package/.docs/raw/guides/guide/research-assistant.mdx +7 -8
- package/.docs/raw/guides/guide/stock-agent.mdx +4 -6
- package/.docs/raw/guides/guide/web-search.mdx +12 -10
- package/.docs/raw/guides/migrations/agentnetwork.mdx +4 -4
- package/.docs/raw/guides/migrations/ai-sdk-v4-to-v5.mdx +1 -1
- package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +29 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/tools.mdx +5 -0
- package/.docs/raw/guides/migrations/upgrade-to-v1/workflows.mdx +22 -0
- package/.docs/raw/guides/migrations/vnext-to-standard-apis.mdx +2 -2
- package/.docs/raw/index.mdx +2 -2
- package/.docs/raw/mcp/overview.mdx +3 -5
- package/.docs/raw/memory/memory-processors.mdx +1 -2
- package/.docs/raw/memory/semantic-recall.mdx +7 -7
- package/.docs/raw/memory/storage/memory-with-libsql.mdx +2 -4
- package/.docs/raw/memory/storage/memory-with-mongodb.mdx +2 -4
- package/.docs/raw/memory/storage/memory-with-pg.mdx +2 -4
- package/.docs/raw/memory/storage/memory-with-upstash.mdx +2 -4
- package/.docs/raw/memory/threads-and-resources.mdx +3 -3
- package/.docs/raw/memory/working-memory.mdx +4 -5
- package/.docs/raw/{logging.mdx → observability/logging.mdx} +1 -1
- package/.docs/raw/observability/overview.mdx +2 -2
- package/.docs/raw/observability/tracing/exporters/otel.mdx +21 -2
- package/.docs/raw/observability/tracing/exporters/posthog.mdx +107 -0
- package/.docs/raw/observability/tracing/overview.mdx +3 -2
- package/.docs/raw/rag/chunking-and-embedding.mdx +16 -17
- package/.docs/raw/rag/overview.mdx +3 -2
- package/.docs/raw/rag/retrieval.mdx +20 -32
- package/.docs/raw/reference/agents/agent.mdx +7 -10
- package/.docs/raw/reference/agents/generateLegacy.mdx +2 -2
- package/.docs/raw/reference/agents/getLLM.mdx +1 -1
- package/.docs/raw/reference/agents/network.mdx +2 -3
- package/.docs/raw/reference/cli/mastra.mdx +2 -1
- package/.docs/raw/reference/client-js/agents.mdx +3 -3
- package/.docs/raw/reference/core/getLogger.mdx +1 -1
- package/.docs/raw/reference/core/listLogs.mdx +1 -1
- package/.docs/raw/reference/core/listLogsByRunId.mdx +1 -1
- package/.docs/raw/reference/core/mastra-model-gateway.mdx +5 -19
- package/.docs/raw/reference/core/setLogger.mdx +1 -1
- package/.docs/raw/reference/core/setTelemetry.mdx +1 -1
- package/.docs/raw/reference/evals/answer-relevancy.mdx +28 -98
- package/.docs/raw/reference/evals/answer-similarity.mdx +12 -258
- package/.docs/raw/reference/evals/bias.mdx +29 -87
- package/.docs/raw/reference/evals/completeness.mdx +31 -90
- package/.docs/raw/reference/evals/content-similarity.mdx +28 -88
- package/.docs/raw/reference/evals/context-precision.mdx +28 -130
- package/.docs/raw/reference/evals/context-relevance.mdx +11 -11
- package/.docs/raw/reference/evals/faithfulness.mdx +28 -101
- package/.docs/raw/reference/evals/hallucination.mdx +28 -103
- package/.docs/raw/reference/evals/keyword-coverage.mdx +28 -107
- package/.docs/raw/reference/evals/noise-sensitivity.mdx +11 -11
- package/.docs/raw/reference/evals/prompt-alignment.mdx +15 -15
- package/.docs/raw/reference/evals/textual-difference.mdx +27 -100
- package/.docs/raw/reference/evals/tone-consistency.mdx +25 -98
- package/.docs/raw/reference/evals/tool-call-accuracy.mdx +7 -7
- package/.docs/raw/reference/evals/toxicity.mdx +29 -92
- package/.docs/raw/reference/memory/memory-class.mdx +5 -7
- package/.docs/raw/reference/observability/tracing/exporters/posthog.mdx +132 -0
- package/.docs/raw/reference/processors/batch-parts-processor.mdx +1 -1
- package/.docs/raw/reference/processors/language-detector.mdx +1 -1
- package/.docs/raw/reference/processors/moderation-processor.mdx +2 -2
- package/.docs/raw/reference/processors/pii-detector.mdx +2 -2
- package/.docs/raw/reference/processors/prompt-injection-detector.mdx +1 -1
- package/.docs/raw/reference/processors/system-prompt-scrubber.mdx +2 -3
- package/.docs/raw/reference/processors/token-limiter-processor.mdx +2 -2
- package/.docs/raw/reference/processors/unicode-normalizer.mdx +1 -1
- package/.docs/raw/reference/rag/embeddings.mdx +5 -5
- package/.docs/raw/reference/rag/rerank.mdx +1 -2
- package/.docs/raw/reference/rag/rerankWithScorer.mdx +0 -1
- package/.docs/raw/reference/streaming/agents/stream.mdx +8 -1
- package/.docs/raw/reference/templates/overview.mdx +1 -4
- package/.docs/raw/reference/tools/client.mdx +1 -2
- package/.docs/raw/reference/tools/create-tool.mdx +132 -0
- package/.docs/raw/reference/tools/graph-rag-tool.mdx +5 -5
- package/.docs/raw/reference/tools/mcp-client.mdx +2 -4
- package/.docs/raw/reference/tools/mcp-server.mdx +1 -2
- package/.docs/raw/reference/tools/vector-query-tool.mdx +14 -15
- package/.docs/raw/reference/vectors/chroma.mdx +81 -1
- package/.docs/raw/reference/vectors/couchbase.mdx +24 -17
- package/.docs/raw/reference/vectors/lance.mdx +38 -22
- package/.docs/raw/reference/vectors/libsql.mdx +35 -2
- package/.docs/raw/reference/vectors/mongodb.mdx +35 -2
- package/.docs/raw/reference/vectors/opensearch.mdx +37 -16
- package/.docs/raw/reference/vectors/pg.mdx +43 -36
- package/.docs/raw/reference/vectors/pinecone.mdx +48 -1
- package/.docs/raw/reference/vectors/qdrant.mdx +36 -1
- package/.docs/raw/reference/vectors/turbopuffer.mdx +74 -0
- package/.docs/raw/reference/voice/openai-realtime.mdx +2 -2
- package/.docs/raw/reference/voice/voice.addInstructions.mdx +2 -3
- package/.docs/raw/reference/voice/voice.addTools.mdx +1 -1
- package/.docs/raw/reference/voice/voice.answer.mdx +1 -1
- package/.docs/raw/reference/voice/voice.close.mdx +1 -1
- package/.docs/raw/reference/voice/voice.connect.mdx +1 -1
- package/.docs/raw/reference/voice/voice.off.mdx +1 -1
- package/.docs/raw/reference/voice/voice.on.mdx +1 -1
- package/.docs/raw/reference/voice/voice.send.mdx +1 -1
- package/.docs/raw/reference/voice/voice.updateConfig.mdx +1 -1
- package/.docs/raw/server-db/mastra-client.mdx +1 -2
- package/.docs/raw/streaming/overview.mdx +20 -9
- package/.docs/raw/streaming/tool-streaming.mdx +47 -4
- package/.docs/raw/tools-mcp/advanced-usage.mdx +1 -2
- package/.docs/raw/tools-mcp/mcp-overview.mdx +3 -5
- package/.docs/raw/voice/overview.mdx +21 -41
- package/.docs/raw/voice/speech-to-speech.mdx +4 -4
- package/.docs/raw/voice/speech-to-text.mdx +1 -2
- package/.docs/raw/voice/text-to-speech.mdx +1 -2
- package/.docs/raw/workflows/control-flow.mdx +180 -0
- package/CHANGELOG.md +10 -0
- package/dist/{chunk-5NJC7NRO.js → chunk-4CM2BQNP.js} +24 -4
- package/dist/prepare-docs/package-changes.d.ts.map +1 -1
- package/dist/prepare-docs/prepare.js +1 -1
- package/dist/stdio.js +1 -1
- package/package.json +7 -7
- package/.docs/raw/frameworks/agentic-uis/cedar-os.mdx +0 -102
- package/.docs/raw/frameworks/agentic-uis/openrouter.mdx +0 -179
- package/.docs/raw/frameworks/web-frameworks/next-js.mdx +0 -379
- package/.docs/raw/getting-started/quickstart.mdx +0 -27
- package/.docs/raw/getting-started/templates.mdx +0 -73
- /package/.docs/raw/{frameworks/agentic-uis → guides/build-your-ui}/assistant-ui.mdx +0 -0
- /package/.docs/raw/{frameworks/agentic-uis → guides/build-your-ui}/copilotkit.mdx +0 -0
|
@@ -345,6 +345,8 @@ interface IndexStats {
|
|
|
345
345
|
|
|
346
346
|
### updateVector()
|
|
347
347
|
|
|
348
|
+
Update a single vector by ID or by metadata filter. Either `id` or `filter` must be provided, but not both.
|
|
349
|
+
|
|
348
350
|
<PropertiesTable
|
|
349
351
|
content={[
|
|
350
352
|
{
|
|
@@ -355,31 +357,19 @@ interface IndexStats {
|
|
|
355
357
|
{
|
|
356
358
|
name: "id",
|
|
357
359
|
type: "string",
|
|
358
|
-
|
|
360
|
+
isOptional: true,
|
|
361
|
+
description: "ID of the vector to update (mutually exclusive with filter)",
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
name: "filter",
|
|
365
|
+
type: "Record<string, any>",
|
|
366
|
+
isOptional: true,
|
|
367
|
+
description: "Metadata filter to identify vector(s) to update (mutually exclusive with id)",
|
|
359
368
|
},
|
|
360
369
|
{
|
|
361
370
|
name: "update",
|
|
362
|
-
type: "
|
|
363
|
-
description: "
|
|
364
|
-
properties: [
|
|
365
|
-
{
|
|
366
|
-
type: "object",
|
|
367
|
-
parameters: [
|
|
368
|
-
{
|
|
369
|
-
name: "vector",
|
|
370
|
-
type: "number[]",
|
|
371
|
-
description: "New vector values",
|
|
372
|
-
isOptional: true,
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
name: "metadata",
|
|
376
|
-
type: "Record<string, any>",
|
|
377
|
-
description: "New metadata values",
|
|
378
|
-
isOptional: true,
|
|
379
|
-
},
|
|
380
|
-
],
|
|
381
|
-
},
|
|
382
|
-
],
|
|
371
|
+
type: "{ vector?: number[]; metadata?: Record<string, any>; }",
|
|
372
|
+
description: "Object containing the vector and/or metadata to update",
|
|
383
373
|
},
|
|
384
374
|
]}
|
|
385
375
|
/>
|
|
@@ -401,6 +391,32 @@ interface IndexStats {
|
|
|
401
391
|
]}
|
|
402
392
|
/>
|
|
403
393
|
|
|
394
|
+
### deleteVectors()
|
|
395
|
+
|
|
396
|
+
Delete multiple vectors by IDs or by metadata filter. Either `ids` or `filter` must be provided, but not both.
|
|
397
|
+
|
|
398
|
+
<PropertiesTable
|
|
399
|
+
content={[
|
|
400
|
+
{
|
|
401
|
+
name: "indexName",
|
|
402
|
+
type: "string",
|
|
403
|
+
description: "Name of the index containing the vectors to delete",
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
name: "ids",
|
|
407
|
+
type: "string[]",
|
|
408
|
+
isOptional: true,
|
|
409
|
+
description: "Array of vector IDs to delete (mutually exclusive with filter)",
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
name: "filter",
|
|
413
|
+
type: "Record<string, any>",
|
|
414
|
+
isOptional: true,
|
|
415
|
+
description: "Metadata filter to identify vectors to delete (mutually exclusive with ids)",
|
|
416
|
+
},
|
|
417
|
+
]}
|
|
418
|
+
/>
|
|
419
|
+
|
|
404
420
|
### close()
|
|
405
421
|
|
|
406
422
|
Closes the database connection.
|
|
@@ -253,7 +253,7 @@ Removes all vectors from an index while keeping the index structure.
|
|
|
253
253
|
|
|
254
254
|
### updateVector()
|
|
255
255
|
|
|
256
|
-
|
|
256
|
+
Update a single vector by ID or by metadata filter. Either `id` or `filter` must be provided, but not both.
|
|
257
257
|
|
|
258
258
|
<PropertiesTable
|
|
259
259
|
content={[
|
|
@@ -265,7 +265,14 @@ Updates a specific vector entry by its ID with new vector data and/or metadata.
|
|
|
265
265
|
{
|
|
266
266
|
name: "id",
|
|
267
267
|
type: "string",
|
|
268
|
-
|
|
268
|
+
isOptional: true,
|
|
269
|
+
description: "ID of the vector entry to update (mutually exclusive with filter)",
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
name: "filter",
|
|
273
|
+
type: "Record<string, any>",
|
|
274
|
+
isOptional: true,
|
|
275
|
+
description: "Metadata filter to identify vector(s) to update (mutually exclusive with id)",
|
|
269
276
|
},
|
|
270
277
|
{
|
|
271
278
|
name: "update",
|
|
@@ -306,6 +313,32 @@ Deletes a specific vector entry from an index by its ID.
|
|
|
306
313
|
]}
|
|
307
314
|
/>
|
|
308
315
|
|
|
316
|
+
### deleteVectors()
|
|
317
|
+
|
|
318
|
+
Delete multiple vectors by IDs or by metadata filter. Either `ids` or `filter` must be provided, but not both.
|
|
319
|
+
|
|
320
|
+
<PropertiesTable
|
|
321
|
+
content={[
|
|
322
|
+
{
|
|
323
|
+
name: "indexName",
|
|
324
|
+
type: "string",
|
|
325
|
+
description: "Name of the index containing the vectors to delete",
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
name: "ids",
|
|
329
|
+
type: "string[]",
|
|
330
|
+
isOptional: true,
|
|
331
|
+
description: "Array of vector IDs to delete (mutually exclusive with filter)",
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
name: "filter",
|
|
335
|
+
type: "Record<string, any>",
|
|
336
|
+
isOptional: true,
|
|
337
|
+
description: "Metadata filter to identify vectors to delete (mutually exclusive with ids)",
|
|
338
|
+
},
|
|
339
|
+
]}
|
|
340
|
+
/>
|
|
341
|
+
|
|
309
342
|
## Response Types
|
|
310
343
|
|
|
311
344
|
Query results are returned in this format:
|
|
@@ -210,7 +210,7 @@ Returns: `Promise<string[]>`
|
|
|
210
210
|
|
|
211
211
|
### updateVector()
|
|
212
212
|
|
|
213
|
-
|
|
213
|
+
Update a single vector by ID or by metadata filter. Either `id` or `filter` must be provided, but not both.
|
|
214
214
|
|
|
215
215
|
<PropertiesTable
|
|
216
216
|
content={[
|
|
@@ -222,7 +222,14 @@ Updates a specific vector entry by its ID with new vector data and/or metadata.
|
|
|
222
222
|
{
|
|
223
223
|
name: "id",
|
|
224
224
|
type: "string",
|
|
225
|
-
|
|
225
|
+
isOptional: true,
|
|
226
|
+
description: "ID of the vector entry to update (mutually exclusive with filter)",
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
name: "filter",
|
|
230
|
+
type: "Record<string, any>",
|
|
231
|
+
isOptional: true,
|
|
232
|
+
description: "Metadata filter to identify vector(s) to update (mutually exclusive with id)",
|
|
226
233
|
},
|
|
227
234
|
{
|
|
228
235
|
name: "update",
|
|
@@ -263,6 +270,32 @@ Deletes a specific vector entry from an index by its ID.
|
|
|
263
270
|
]}
|
|
264
271
|
/>
|
|
265
272
|
|
|
273
|
+
### deleteVectors()
|
|
274
|
+
|
|
275
|
+
Delete multiple vectors by IDs or by metadata filter. Either `ids` or `filter` must be provided, but not both.
|
|
276
|
+
|
|
277
|
+
<PropertiesTable
|
|
278
|
+
content={[
|
|
279
|
+
{
|
|
280
|
+
name: "indexName",
|
|
281
|
+
type: "string",
|
|
282
|
+
description: "Name of the collection containing the vectors to delete",
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
name: "ids",
|
|
286
|
+
type: "string[]",
|
|
287
|
+
isOptional: true,
|
|
288
|
+
description: "Array of vector IDs to delete (mutually exclusive with filter)",
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
name: "filter",
|
|
292
|
+
type: "Record<string, any>",
|
|
293
|
+
isOptional: true,
|
|
294
|
+
description: "Metadata filter to identify vectors to delete (mutually exclusive with ids)",
|
|
295
|
+
},
|
|
296
|
+
]}
|
|
297
|
+
/>
|
|
298
|
+
|
|
266
299
|
### disconnect()
|
|
267
300
|
|
|
268
301
|
Closes the MongoDB client connection. Should be called when done using the store.
|
|
@@ -142,7 +142,7 @@ Gets information about an index.
|
|
|
142
142
|
|
|
143
143
|
### updateVector()
|
|
144
144
|
|
|
145
|
-
|
|
145
|
+
Update a single vector by ID or by metadata filter. Either `id` or `filter` must be provided, but not both.
|
|
146
146
|
|
|
147
147
|
<PropertiesTable
|
|
148
148
|
content={[
|
|
@@ -154,43 +154,64 @@ Updates a specific vector entry by its ID with new vector data and/or metadata.
|
|
|
154
154
|
{
|
|
155
155
|
name: "id",
|
|
156
156
|
type: "string",
|
|
157
|
-
|
|
157
|
+
isOptional: true,
|
|
158
|
+
description: "The ID of the vector to update (mutually exclusive with filter)",
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: "filter",
|
|
162
|
+
type: "Record<string, any>",
|
|
163
|
+
isOptional: true,
|
|
164
|
+
description: "Metadata filter to identify vector(s) to update (mutually exclusive with id)",
|
|
158
165
|
},
|
|
159
166
|
{
|
|
160
167
|
name: "update",
|
|
161
|
-
type: "
|
|
162
|
-
description: "
|
|
168
|
+
type: "{ vector?: number[]; metadata?: Record<string, any>; }",
|
|
169
|
+
description: "Object containing the vector and/or metadata to update",
|
|
163
170
|
},
|
|
171
|
+
]}
|
|
172
|
+
/>
|
|
173
|
+
|
|
174
|
+
### deleteVector()
|
|
175
|
+
|
|
176
|
+
Deletes a single vector by its ID from the index.
|
|
177
|
+
|
|
178
|
+
<PropertiesTable
|
|
179
|
+
content={[
|
|
164
180
|
{
|
|
165
|
-
name: "
|
|
166
|
-
type: "
|
|
167
|
-
description: "The
|
|
168
|
-
isOptional: true,
|
|
181
|
+
name: "indexName",
|
|
182
|
+
type: "string",
|
|
183
|
+
description: "The name of the index to delete the vector from",
|
|
169
184
|
},
|
|
170
185
|
{
|
|
171
|
-
name: "
|
|
172
|
-
type: "
|
|
173
|
-
description: "The
|
|
174
|
-
isOptional: true,
|
|
186
|
+
name: "id",
|
|
187
|
+
type: "string",
|
|
188
|
+
description: "The ID of the vector to delete",
|
|
175
189
|
},
|
|
176
190
|
]}
|
|
177
191
|
/>
|
|
178
192
|
|
|
179
|
-
###
|
|
193
|
+
### deleteVectors()
|
|
180
194
|
|
|
181
|
-
|
|
195
|
+
Delete multiple vectors by IDs or by metadata filter. Either `ids` or `filter` must be provided, but not both.
|
|
182
196
|
|
|
183
197
|
<PropertiesTable
|
|
184
198
|
content={[
|
|
185
199
|
{
|
|
186
200
|
name: "indexName",
|
|
187
201
|
type: "string",
|
|
188
|
-
description: "
|
|
202
|
+
description: "Name of the index containing the vectors to delete",
|
|
189
203
|
},
|
|
190
204
|
{
|
|
191
205
|
name: "ids",
|
|
192
206
|
type: "string[]",
|
|
193
|
-
|
|
207
|
+
isOptional: true,
|
|
208
|
+
description: "Array of vector IDs to delete (mutually exclusive with filter)",
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: "filter",
|
|
212
|
+
type: "Record<string, any>",
|
|
213
|
+
isOptional: true,
|
|
214
|
+
description: "Metadata filter to identify vectors to delete (mutually exclusive with ids)",
|
|
194
215
|
},
|
|
195
216
|
]}
|
|
196
217
|
/>
|
|
@@ -403,6 +403,8 @@ interface PGIndexStats {
|
|
|
403
403
|
|
|
404
404
|
### updateVector()
|
|
405
405
|
|
|
406
|
+
Update a single vector by ID or by metadata filter. Either `id` or `filter` must be provided, but not both.
|
|
407
|
+
|
|
406
408
|
<PropertiesTable
|
|
407
409
|
content={[
|
|
408
410
|
{
|
|
@@ -413,63 +415,42 @@ interface PGIndexStats {
|
|
|
413
415
|
{
|
|
414
416
|
name: "id",
|
|
415
417
|
type: "string",
|
|
416
|
-
|
|
418
|
+
isOptional: true,
|
|
419
|
+
description: "ID of the vector to update (mutually exclusive with filter)",
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
name: "filter",
|
|
423
|
+
type: "Record<string, any>",
|
|
424
|
+
isOptional: true,
|
|
425
|
+
description: "Metadata filter to identify vector(s) to update (mutually exclusive with id)",
|
|
417
426
|
},
|
|
418
427
|
{
|
|
419
428
|
name: "update",
|
|
420
|
-
type: "
|
|
421
|
-
description: "
|
|
422
|
-
properties: [
|
|
423
|
-
{
|
|
424
|
-
type: "object",
|
|
425
|
-
parameters: [
|
|
426
|
-
{
|
|
427
|
-
name: "vector",
|
|
428
|
-
type: "number[]",
|
|
429
|
-
description: "New vector values",
|
|
430
|
-
isOptional: true,
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
name: "metadata",
|
|
434
|
-
type: "Record<string, any>",
|
|
435
|
-
description: "New metadata values",
|
|
436
|
-
isOptional: true,
|
|
437
|
-
},
|
|
438
|
-
],
|
|
439
|
-
},
|
|
440
|
-
],
|
|
429
|
+
type: "{ vector?: number[]; metadata?: Record<string, any>; }",
|
|
430
|
+
description: "Object containing the vector and/or metadata to update",
|
|
441
431
|
},
|
|
442
432
|
]}
|
|
443
433
|
/>
|
|
444
434
|
|
|
445
|
-
Updates an existing vector by ID. At least one of vector or metadata must be provided.
|
|
435
|
+
Updates an existing vector by ID or filter. At least one of vector or metadata must be provided in the update object.
|
|
446
436
|
|
|
447
437
|
```typescript copy
|
|
448
|
-
// Update
|
|
438
|
+
// Update by ID
|
|
449
439
|
await pgVector.updateVector({
|
|
450
440
|
indexName: "my_vectors",
|
|
451
441
|
id: "vector123",
|
|
452
442
|
update: {
|
|
453
443
|
vector: [0.1, 0.2, 0.3],
|
|
454
|
-
},
|
|
455
|
-
});
|
|
456
|
-
|
|
457
|
-
// Update just the metadata
|
|
458
|
-
await pgVector.updateVector({
|
|
459
|
-
indexName: "my_vectors",
|
|
460
|
-
id: "vector123",
|
|
461
|
-
update: {
|
|
462
444
|
metadata: { label: "updated" },
|
|
463
445
|
},
|
|
464
446
|
});
|
|
465
447
|
|
|
466
|
-
// Update
|
|
448
|
+
// Update by filter
|
|
467
449
|
await pgVector.updateVector({
|
|
468
450
|
indexName: "my_vectors",
|
|
469
|
-
|
|
451
|
+
filter: { category: "product" },
|
|
470
452
|
update: {
|
|
471
|
-
|
|
472
|
-
metadata: { label: "updated" },
|
|
453
|
+
metadata: { status: "reviewed" },
|
|
473
454
|
},
|
|
474
455
|
});
|
|
475
456
|
```
|
|
@@ -497,6 +478,32 @@ Deletes a single vector by ID from the specified index.
|
|
|
497
478
|
await pgVector.deleteVector({ indexName: "my_vectors", id: "vector123" });
|
|
498
479
|
```
|
|
499
480
|
|
|
481
|
+
### deleteVectors()
|
|
482
|
+
|
|
483
|
+
Delete multiple vectors by IDs or by metadata filter. Either `ids` or `filter` must be provided, but not both.
|
|
484
|
+
|
|
485
|
+
<PropertiesTable
|
|
486
|
+
content={[
|
|
487
|
+
{
|
|
488
|
+
name: "indexName",
|
|
489
|
+
type: "string",
|
|
490
|
+
description: "Name of the index containing the vectors to delete",
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
name: "ids",
|
|
494
|
+
type: "string[]",
|
|
495
|
+
isOptional: true,
|
|
496
|
+
description: "Array of vector IDs to delete (mutually exclusive with filter)",
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
name: "filter",
|
|
500
|
+
type: "Record<string, any>",
|
|
501
|
+
isOptional: true,
|
|
502
|
+
description: "Metadata filter to identify vectors to delete (mutually exclusive with ids)",
|
|
503
|
+
},
|
|
504
|
+
]}
|
|
505
|
+
/>
|
|
506
|
+
|
|
500
507
|
### disconnect()
|
|
501
508
|
|
|
502
509
|
Closes the database connection pool. Should be called when done using the store.
|
|
@@ -206,6 +206,8 @@ interface IndexStats {
|
|
|
206
206
|
|
|
207
207
|
### updateVector()
|
|
208
208
|
|
|
209
|
+
Update a single vector by ID or by metadata filter. Either `id` or `filter` must be provided, but not both.
|
|
210
|
+
|
|
209
211
|
<PropertiesTable
|
|
210
212
|
content={[
|
|
211
213
|
{
|
|
@@ -216,7 +218,20 @@ interface IndexStats {
|
|
|
216
218
|
{
|
|
217
219
|
name: "id",
|
|
218
220
|
type: "string",
|
|
219
|
-
|
|
221
|
+
isOptional: true,
|
|
222
|
+
description: "ID of the vector to update (mutually exclusive with filter)",
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: "filter",
|
|
226
|
+
type: "Record<string, any>",
|
|
227
|
+
isOptional: true,
|
|
228
|
+
description: "Metadata filter to identify vector(s) to update (mutually exclusive with id)",
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
name: "namespace",
|
|
232
|
+
type: "string",
|
|
233
|
+
isOptional: true,
|
|
234
|
+
description: "Optional namespace for the update operation",
|
|
220
235
|
},
|
|
221
236
|
{
|
|
222
237
|
name: "update",
|
|
@@ -255,6 +270,38 @@ interface IndexStats {
|
|
|
255
270
|
]}
|
|
256
271
|
/>
|
|
257
272
|
|
|
273
|
+
### deleteVectors()
|
|
274
|
+
|
|
275
|
+
Delete multiple vectors by IDs or by metadata filter. Either `ids` or `filter` must be provided, but not both.
|
|
276
|
+
|
|
277
|
+
<PropertiesTable
|
|
278
|
+
content={[
|
|
279
|
+
{
|
|
280
|
+
name: "indexName",
|
|
281
|
+
type: "string",
|
|
282
|
+
description: "Name of the index containing the vectors to delete",
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
name: "ids",
|
|
286
|
+
type: "string[]",
|
|
287
|
+
isOptional: true,
|
|
288
|
+
description: "Array of vector IDs to delete (mutually exclusive with filter)",
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
name: "filter",
|
|
292
|
+
type: "Record<string, any>",
|
|
293
|
+
isOptional: true,
|
|
294
|
+
description: "Metadata filter to identify vectors to delete (mutually exclusive with ids)",
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
name: "namespace",
|
|
298
|
+
type: "string",
|
|
299
|
+
isOptional: true,
|
|
300
|
+
description: "Optional namespace for the deletion operation",
|
|
301
|
+
},
|
|
302
|
+
]}
|
|
303
|
+
/>
|
|
304
|
+
|
|
258
305
|
## Response Types
|
|
259
306
|
|
|
260
307
|
Query results are returned in this format:
|
|
@@ -159,6 +159,8 @@ interface IndexStats {
|
|
|
159
159
|
|
|
160
160
|
### updateVector()
|
|
161
161
|
|
|
162
|
+
Update a single vector by ID or by metadata filter. Either `id` or `filter` must be provided, but not both.
|
|
163
|
+
|
|
162
164
|
<PropertiesTable
|
|
163
165
|
content={[
|
|
164
166
|
{
|
|
@@ -169,7 +171,14 @@ interface IndexStats {
|
|
|
169
171
|
{
|
|
170
172
|
name: "id",
|
|
171
173
|
type: "string",
|
|
172
|
-
|
|
174
|
+
isOptional: true,
|
|
175
|
+
description: "ID of the vector to update (mutually exclusive with filter)",
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: "filter",
|
|
179
|
+
type: "Record<string, any>",
|
|
180
|
+
isOptional: true,
|
|
181
|
+
description: "Metadata filter to identify vector(s) to update (mutually exclusive with id)",
|
|
173
182
|
},
|
|
174
183
|
{
|
|
175
184
|
name: "update",
|
|
@@ -200,6 +209,32 @@ Updates a vector and/or its metadata in the specified index. If both vector and
|
|
|
200
209
|
|
|
201
210
|
Deletes a vector from the specified index by its ID.
|
|
202
211
|
|
|
212
|
+
### deleteVectors()
|
|
213
|
+
|
|
214
|
+
Delete multiple vectors by IDs or by metadata filter. Either `ids` or `filter` must be provided, but not both.
|
|
215
|
+
|
|
216
|
+
<PropertiesTable
|
|
217
|
+
content={[
|
|
218
|
+
{
|
|
219
|
+
name: "indexName",
|
|
220
|
+
type: "string",
|
|
221
|
+
description: "Name of the index containing the vectors to delete",
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
name: "ids",
|
|
225
|
+
type: "string[]",
|
|
226
|
+
isOptional: true,
|
|
227
|
+
description: "Array of vector IDs to delete (mutually exclusive with filter)",
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: "filter",
|
|
231
|
+
type: "Record<string, any>",
|
|
232
|
+
isOptional: true,
|
|
233
|
+
description: "Metadata filter to identify vectors to delete (mutually exclusive with ids)",
|
|
234
|
+
},
|
|
235
|
+
]}
|
|
236
|
+
/>
|
|
237
|
+
|
|
203
238
|
## Response Types
|
|
204
239
|
|
|
205
240
|
Query results are returned in this format:
|
|
@@ -190,6 +190,80 @@ interface IndexStats {
|
|
|
190
190
|
]}
|
|
191
191
|
/>
|
|
192
192
|
|
|
193
|
+
### updateVector()
|
|
194
|
+
|
|
195
|
+
Update a single vector by ID or by metadata filter. Either `id` or `filter` must be provided, but not both.
|
|
196
|
+
|
|
197
|
+
<PropertiesTable
|
|
198
|
+
content={[
|
|
199
|
+
{
|
|
200
|
+
name: "indexName",
|
|
201
|
+
type: "string",
|
|
202
|
+
description: "Name of the index containing the vector",
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: "id",
|
|
206
|
+
type: "string",
|
|
207
|
+
isOptional: true,
|
|
208
|
+
description: "ID of the vector to update (mutually exclusive with filter)",
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: "filter",
|
|
212
|
+
type: "Record<string, any>",
|
|
213
|
+
isOptional: true,
|
|
214
|
+
description: "Metadata filter to identify vector(s) to update (mutually exclusive with id)",
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
name: "update",
|
|
218
|
+
type: "{ vector?: number[]; metadata?: Record<string, any>; }",
|
|
219
|
+
description: "Object containing the vector and/or metadata to update",
|
|
220
|
+
},
|
|
221
|
+
]}
|
|
222
|
+
/>
|
|
223
|
+
|
|
224
|
+
### deleteVector()
|
|
225
|
+
|
|
226
|
+
<PropertiesTable
|
|
227
|
+
content={[
|
|
228
|
+
{
|
|
229
|
+
name: "indexName",
|
|
230
|
+
type: "string",
|
|
231
|
+
description: "Name of the index containing the vector",
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
name: "id",
|
|
235
|
+
type: "string",
|
|
236
|
+
description: "ID of the vector to delete",
|
|
237
|
+
},
|
|
238
|
+
]}
|
|
239
|
+
/>
|
|
240
|
+
|
|
241
|
+
### deleteVectors()
|
|
242
|
+
|
|
243
|
+
Delete multiple vectors by IDs or by metadata filter. Either `ids` or `filter` must be provided, but not both.
|
|
244
|
+
|
|
245
|
+
<PropertiesTable
|
|
246
|
+
content={[
|
|
247
|
+
{
|
|
248
|
+
name: "indexName",
|
|
249
|
+
type: "string",
|
|
250
|
+
description: "Name of the index containing the vectors to delete",
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
name: "ids",
|
|
254
|
+
type: "string[]",
|
|
255
|
+
isOptional: true,
|
|
256
|
+
description: "Array of vector IDs to delete (mutually exclusive with filter)",
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
name: "filter",
|
|
260
|
+
type: "Record<string, any>",
|
|
261
|
+
isOptional: true,
|
|
262
|
+
description: "Metadata filter to identify vectors to delete (mutually exclusive with ids)",
|
|
263
|
+
},
|
|
264
|
+
]}
|
|
265
|
+
/>
|
|
266
|
+
|
|
193
267
|
## Response Types
|
|
194
268
|
|
|
195
269
|
Query results are returned in this format:
|
|
@@ -19,7 +19,7 @@ const voice = new OpenAIRealtimeVoice();
|
|
|
19
19
|
// Or initialize with specific configuration
|
|
20
20
|
const voiceWithConfig = new OpenAIRealtimeVoice({
|
|
21
21
|
apiKey: "your-openai-api-key",
|
|
22
|
-
model: "gpt-
|
|
22
|
+
model: "gpt-5.1-realtime-preview-2024-12-17",
|
|
23
23
|
speaker: "alloy", // Default voice
|
|
24
24
|
});
|
|
25
25
|
|
|
@@ -69,7 +69,7 @@ voice.connect();
|
|
|
69
69
|
type: "string",
|
|
70
70
|
description: "The model ID to use for real-time voice interactions.",
|
|
71
71
|
isOptional: true,
|
|
72
|
-
defaultValue: "'gpt-
|
|
72
|
+
defaultValue: "'gpt-5.1-realtime-preview-2024-12-17'",
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
name: "apiKey",
|
|
@@ -12,12 +12,11 @@ The `addInstructions()` method equips a voice provider with instructions that gu
|
|
|
12
12
|
```typescript
|
|
13
13
|
import { OpenAIRealtimeVoice } from "@mastra/voice-openai-realtime";
|
|
14
14
|
import { Agent } from "@mastra/core/agent";
|
|
15
|
-
import { openai } from "@ai-sdk/openai";
|
|
16
15
|
|
|
17
16
|
// Initialize a real-time voice provider
|
|
18
17
|
const voice = new OpenAIRealtimeVoice({
|
|
19
18
|
realtimeConfig: {
|
|
20
|
-
model: "gpt-
|
|
19
|
+
model: "gpt-5.1-realtime",
|
|
21
20
|
apiKey: process.env.OPENAI_API_KEY,
|
|
22
21
|
},
|
|
23
22
|
});
|
|
@@ -27,7 +26,7 @@ const agent = new Agent({
|
|
|
27
26
|
name: "Customer Support Agent",
|
|
28
27
|
instructions:
|
|
29
28
|
"You are a helpful customer support agent for a software company.",
|
|
30
|
-
model: openai
|
|
29
|
+
model: "openai/gpt-5.1",
|
|
31
30
|
voice,
|
|
32
31
|
});
|
|
33
32
|
|
|
@@ -23,7 +23,7 @@ const speaker = new Speaker({
|
|
|
23
23
|
// Initialize a real-time voice provider
|
|
24
24
|
const voice = new OpenAIRealtimeVoice({
|
|
25
25
|
realtimeConfig: {
|
|
26
|
-
model: "gpt-
|
|
26
|
+
model: "gpt-5.1",
|
|
27
27
|
apiKey: process.env.OPENAI_API_KEY,
|
|
28
28
|
},
|
|
29
29
|
speaker: "alloy", // Default voice
|
|
@@ -16,7 +16,7 @@ import { getMicrophoneStream } from "@mastra/node-audio";
|
|
|
16
16
|
// Initialize a real-time voice provider
|
|
17
17
|
const voice = new OpenAIRealtimeVoice({
|
|
18
18
|
realtimeConfig: {
|
|
19
|
-
model: "gpt-
|
|
19
|
+
model: "gpt-5.1-realtime",
|
|
20
20
|
apiKey: process.env.OPENAI_API_KEY,
|
|
21
21
|
},
|
|
22
22
|
});
|