UpsertVectorsResponse
Reports how many vector records were inserted or updated.
For the list of response object types, see Response Objects.
Use UpsertVectorsResponse to inspect the count of records affected by an upsert operation.
Attributes
| Attribute | Type | Description |
|---|---|---|
upserted_count |
int or float or None |
Number of records upserted by the request. |
Methods
| Method | Return Type | Description |
|---|---|---|
model_dump() |
dict[str, Any] |
Returns a dictionary representation of the response. |
model_dump_json() |
str |
Returns a JSON string representation of the response. |
to_dict() |
dict[str, Any] |
Returns a dictionary representation compatible with earlier SDK response handling. |
to_json() |
str |
Returns a JSON string representation compatible with earlier SDK response handling. |
to_str() |
str |
Returns a readable string representation compatible with earlier SDK response handling. |
model_validate(obj) |
UpsertVectorsResponse |
Creates a response object from a dictionary payload. |
model_validate_json(json_data) |
UpsertVectorsResponse |
Creates a response object from a JSON string. |
Iterate Attributes
Use the response serialization helper to iterate every public attribute.
response = client.upsert_vectors(
table_name="product_vectors",
vectors=[
{
"id": "prod_001",
"metadata": {"name": "Trail running shoes"},
"dense_vector": [0.12, 0.45, 0.32],
}
],
)
payload = response.to_dict()
for attribute, value in payload.items():
print(attribute, value)
Sample Response
{
"upserted_count": 2
}
Returned By
Returned by: upsert_vectors().