Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue 1st 馃帀 #1

Closed
efkan opened this issue Feb 23, 2024 · 1 comment
Closed

issue 1st 馃帀 #1

efkan opened this issue Feb 23, 2024 · 1 comment

Comments

@efkan
Copy link

efkan commented Feb 23, 2024

I can't believe this repo still doesn't have an issue. You've made it great!

I wonder how I can get all the records from DB.

If I pass an empty string with the purpose of getting all documents from the db, it throws the error of Error: input must be a string.

The piece of code I execute:

image
@themaximalist
Copy link
Owner

themaximalist commented Feb 23, 2024

Thanks @efkan! The best way to get all records is probably by accessing the internal inputs, rather than searching. Something like this should work

for (let i = 0; i < vectorStore.inputs.length; i++) {
    console.log("INPUT", i, vectorStore.inputs[i]);
    console.log("OBJECTS", i, vectorStore.objects[i]);
}

If this turns out to be a common case I can add a helper like vectorStore.all() that returns these automatically.

Please let me know if this doesn't work for you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants