-
-
Notifications
You must be signed in to change notification settings - Fork 137
[Store][ChromaDB] Add documents for text context #1012
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
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| /** | ||
| * @param array{where?: array<string, string>, whereDocument?: array<string, mixed>} $options | ||
| * @param array{where?: array<string, string>, whereDocument?: array<string, mixed>, include?: array<string>} $options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which expectations do we have here for the include option?
if i just want embeddings, metadatas and distances - how would i enable that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't want to specify anything, simply leave it out. Then the default from the ChromaDB extension will be used. That's how it was before. However, as soon as something is passed by the user, we should ensure that at least the metadata and embeddings are included, which the array merge does (maybe we can remove distance)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't want to specify anything, simply leave it out.
yup, got that, that's good 👍
i understand that we basically treat ['embeddings', 'metadatas', 'distances'] as the default here, right?
what would i need to do, to enable that default? i'm questioning if that even works with that current implementation. adding a test here would be great
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reviewing the code and for the comments.
I've added some tests.
The default $include = null should work since CodeWithKyrian/chromadb-php has the correct default (see link).
However, we can also define our own default if you like...
cd847c1 to
88efb84
Compare
|
Do I need to adjust anything, or is it okay as is? |
|
From the code POV it looks ok, lets wait for the review of @chr-hertel, but please do a proper rebase, we cannot merge it, when a Merge-Commit is present (see Fabbot CI failure) |
|
Thanks but I don't think I can manage a clean rebase myself! When I rebase to the upstream, it always includes the commit history in the pull request. I don't think that's desired. Any help would be appreciated :-) |
|
|
|
no change. Maybe i have to close the Pull an make an new one!? |
fd5a907 to
88efb84
Compare
88efb84 to
c745db0
Compare
d38d60b to
bfe346c
Compare
|
hard job :-) But i think the pull is fine now :-) Please excuse the inconvenience. |
To work properly with embeddings, the text context is also needed, otherwise LLM won't get the overall context. Therefore, it's possible to query the text context from the database too.