Docs

Python: Vectors and embeddings

Embed text, store vectors with metadata and run similarity search with the Python SDK.

Updated Oct 16, 2026
await sovaria.vector_upsert("articles", [
    {"id": "a1", "text": "How to reset your password", "metadata": {"lang": "en"}},
    {"id": "a2", "text": "Exporting invoices as PDF", "metadata": {"lang": "en"}},
])
hits = await sovaria.vector_search("articles", "forgot my login", top_k=3, metadata_filter={"lang": "en"})

Methods

sovaria.vector_delete_collection

Delete an entire vector collection.

await sovaria.vector_delete_collection(
    collection: str,
) -> dict[str, Any]

Parameters

collectionstrrequired
Returns
dict[str, Any]

sovaria.vector_delete_record

Delete a record from a vector collection.

await sovaria.vector_delete_record(
    collection: str,
    record_id: str,
) -> dict[str, Any]

Parameters

collectionstrrequired
record_idstrrequired
Returns
dict[str, Any]

sovaria.vector_embed

Generate embeddings for one or more texts.

await sovaria.vector_embed(texts: list[str]) -> dict[str, Any]

Parameters

textslist[str]required
Returns
dict[str, Any]

sovaria.vector_list_collections

List vector collections in the current project scope.

await sovaria.vector_list_collections() -> dict[str, Any]
Returns
dict[str, Any]

sovaria.vector_list_records

List records stored in a vector collection.

await sovaria.vector_list_records(
    collection: str,
    *, limit: int | None = None,
    offset: int | None = None,
) -> dict[str, Any]

Parameters

collectionstrrequired
limitint | Noneoptionaldefault None
offsetint | Noneoptionaldefault None
Returns
dict[str, Any]

sovaria.vector_upsert

Embed and upsert documents into a vector collection.

await sovaria.vector_upsert(
    collection: str,
    docs: list[dict[str, Any]],
) -> dict[str, Any]

Parameters

collectionstrrequired
docslist[dict[str, Any]]required
Returns
dict[str, Any]
Something unclear or missing on this page?Tell us