-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce EmbeddedDocument
#101
Introduce EmbeddedDocument
#101
Conversation
what do you think about like a tupel of document classes:
/**
* @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|array $documents): void;
/**
* @return VectorDocument[]
*/
VectorStoreInterface::query(Vector $vector, array $options = []): array; |
I like it, I thought sth like this without inheritance too in the beginning |
thought about a |
No I don't think we need that abstraction upstream |
you want to tackle that with your PRs or shall I? |
If you have time, go ahead. Either use my PR or open a new one where you do the transformation completely |
1a57ca7
to
f7107fa
Compare
d2c2e04
to
fc98d87
Compare
Can be merged after