Promise<GetResultItem[]>: A Promise that resolves to an array of retrieved vector items with type-safe access to fields. Each item contains the requested fields based on the include parameter. See the GetResultItem type for more details.
The method returns an array of objects with the following structure:
Copy
Ask AI
// Example response with all fields[ { "id": "doc1", "vector": [0.1, 0.2, 0.3, 0.4], "contents": "This is the first document content", "metadata": { "title": "Document 1", "category": "research", "date": "2024-01-15" } }, { "id": "doc2", "vector": [0.4, 0.5, 0.6, 0.7], "contents": "This is the second document content", "metadata": { "title": "Document 2", "category": "tutorial", "date": "2024-01-16" } }]
The contents field is returned as a decoded UTF-8 string, regardless of whether it was originally stored as a string or Buffer. The SDK automatically decodes the base64 response from the server.