-
-
Notifications
You must be signed in to change notification settings - Fork 135
[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
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.