Closed chr-hertel closed 1 month ago
TextDocument and VectorDocument - both have an UUID and Metadata
TextDocument
VectorDocument
/** * @param TextDocument|TextDocument[] $documents */ DocumentEmbedder::create(TextDocument|array $documents, ...): void // only converting than $vectorDocuments[] = new VectorDocument($vectors[$i], $document->id, $document->metadata); // and drop text in store context completely /** * @param VectorDocument|VectorDocument[] $documents **/ StoreInterface::add(VectorDocument ...$documents): void; /** * @return VectorDocument[] */ VectorStoreInterface::query(Vector $vector, array $options = []): array;
I like this PR
from my side ready to merge - any final thoughts?
Based on
95
101
Goal
TextDocument
andVectorDocument
- both have an UUID and Metadata