Source declarations and literal docstrings from this release. Package code was not executed.
upstash-vector/client
(upstash-vector/client . opts)
Build an Upstash Vector client map. Options: :url (default: UPSTASH_VECTOR_REST_URL env var — your index REST URL), :token (default: UPSTASH_VECTOR_REST_TOKEN env var), :timeout in ms (default 30000). Errors if the URL or token is missing.
Fetch vectors by id. ids is a list of ids (strings or numbers). opts: :include-metadata (default #t), :include-vectors (default #f), :include-data (default #f), :namespace (default ""). Returns a list of vectors (nil entries for ids not found).
Query for the nearest vectors to vector (a list of numbers). opts: :top-k (default 10), :include-metadata (default #t), :include-vectors (default #f), :include-data (default #f), :filter (a metadata filter string), :namespace (default ""). Returns a list of matches ({:id ... :score ... :metadata ...}).
Make a raw Upstash Vector request. method is "GET"/"POST"/"DELETE", path an API path ("/query", "/upsert/my-namespace"). body is a map/list (sent as JSON) or nil. Returns the full decoded response map ({:result ...}); raises on non-2xx.
Insert or overwrite vectors. vectors is a map, or a list of maps, each with :id, :vector, and optional :metadata / :data. opts: :namespace (default ""). Returns Upstash's result ("Success").