Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Python SDK Reference
# Option 1: Dictionary format index.upsert(items) # Option 2: Separate arrays index.upsert(ids, vectors)
items
List[Dict]
[ { "id": str, # Unique identifier for the vector "vector": List[float], # The vector data "contents": str, # Optional text content associated with the vector "metadata": Dict # Optional key-value pairs for filtering and retrieval }, ... ]
ids
List[str]
vectors
List[List[float]]
np.ndarray
None
# Basic vector upsert items = [ { 'id': 'doc1', 'vector': [0.1, 0.2, 0.3, 0.4] }, { 'id': 'doc2', 'vector': [0.5, 0.6, 0.7, 0.8] } ] index.upsert(items)
import numpy as np # Using separate arrays ids = ['vec1', 'vec2', 'vec3'] vectors = np.random.rand(3, 128).astype(np.float32) index.upsert(ids, vectors)
Was this page helpful?