-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
feat(community): Add delete and allow default row id in libsql #7053
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Also, let me know if I should create issues to go along with this PR. |
Hey @cdierkens! Issue would be nice but not necessary. I was going off the setup instructions here: https://js.langchain.com/docs/integrations/vectorstores/libsql/#setup-the-table-and-index Had to manually set up a Turso instance for integration tests. Thanks for this! Will look hopefully tomorrow! |
@jacoblee93 Yeah I had issues with those instructions as well. Following these helped alot: |
Oh I updated them in my previous PR and they should work now! |
@jacoblee93 What can I do to keep this moving. I'm available to help in any way. |
You're good, will look today or tomorrow! |
*/ | ||
async delete(params: { ids?: string[] | number[] }): Promise<void> { | ||
if (!params.ids) { | ||
await this.db.execute(`DELETE FROM ${this.table}`); |
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.
We usually gate this on a deleteAll
flag - will add
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.
Thank you for your patience!
No worries! |
…hain-ai#7053) Co-authored-by: jacoblee93 <jacoblee93@gmail.com>
…hain-ai#7053) Co-authored-by: jacoblee93 <jacoblee93@gmail.com>
@jacoblee93 Sorry to tag directly, just noticed you were working here last!
Changes
addVectors
function we've used thevector(:embedding)
libsql functionString
wherever id's are returned per theDocument
typeCould use Help
I'd suspect that we should use
OpenAIEmbeddings
throughout so we can run all tests against a locallibsql
db and a remote hosted db. Right now I usedOllamaEmbeddings
in all the new test because theOPENAI_API_KEY
in my .env was not picked up.OllamaEmbeddings
with the default model are1024
dimensions whileOpenAIEmbeddings
are 1536. I don't see a create table statement in the existing test, so I'm not sure if it was created manually with 1536, or that's something that Turso does automatically.Other things I wouldn't mind adding