import { APIResource } from "../../core/resource.js"; import * as CompletionsAPI from "../chat/completions.js"; import * as VectorStoresAPI from "./vector-stores.js"; import { APIPromise } from "../../core/api-promise.js"; import { CursorPageVectors, type CursorPageVectorsParams, PagePromise } from "../../core/pagination.js"; import { RequestOptions } from "../../internal/request-options.js"; export declare class Vectors extends APIResource { /** * Retrieve a single document by its unique ID. * * Returns the document's full content, metadata, and optionally its embedding * vector. Use this endpoint for direct lookups when the exact document ID is * known. For content similarity search, use the query endpoint. */ retrieve(vectorID: string, params: VectorRetrieveParams, options?: RequestOptions): APIPromise; /** * List documents in a vector store with cursor-based pagination. * * **Use Cases:** Browse documents, export content, audit stored data, or retrieve * documents by metadata without semantic search. * * **Ordering:** Documents are returned in storage order (insertion order), not * ranked by similarity. For similarity-based retrieval, use the query endpoint. * * **Filtering:** Apply metadata filters to narrow results to specific subsets * (e.g., all documents where `category: "research"`). Only indexed fields can be * used for filtering. * * **Pagination:** Uses cursor-based pagination for efficient traversal of large * datasets. Pass the `next_cursor` from each response as `starting_after` to * retrieve the next page, or `prev_cursor` as `ending_before` to retrieve the * previous page. A null cursor indicates no further pages exist. * * **Embedding Vectors:** Setting `include_vectors=true` includes the full * embedding vector arrays in the response. This significantly increases payload * size and reduces the maximum page size from 1000 to 100 documents. Enable only * when raw vectors are required for external processing. */ list(vectorStoreName: string, query?: VectorListParams | null | undefined, options?: RequestOptions): PagePromise; } export type VectorDocumentsCursorPageVectors = CursorPageVectors; /** * A document returned from direct lookups (get/list operations). */ export interface VectorDocument { /** * Document ID */ id: string; /** * Text content for documents. */ content?: VectorStoresAPI.TextContent; /** * Key-value metadata */ metadata?: { [key: string]: unknown; }; /** * Embedding vector (if requested) */ vector?: Array; } export interface VectorRetrieveParams { /** * Path param: The name of the vector store */ vector_store_name: string; /** * Query param: Include embedding vectors */ include_vectors?: boolean; } export interface VectorListParams extends CursorPageVectorsParams { /** * @deprecated Alias for starting_after. Use starting_after instead. */ cursor?: string; /** * Metadata filter expression (JSON) */ filter?: string; /** * Include embedding vectors */ include_vectors?: boolean; sort_by?: string; sort_order?: CompletionsAPI.SortOrder; } export declare namespace Vectors { export { type VectorDocument as VectorDocument, type VectorDocumentsCursorPageVectors as VectorDocumentsCursorPageVectors, type VectorRetrieveParams as VectorRetrieveParams, type VectorListParams as VectorListParams, }; } //# sourceMappingURL=vectors.d.ts.map