-
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
Weaviate vector store #708
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -0,0 +1,146 @@ | |||
import { IWeaviateClient } from "weaviate-ts-client"; |
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.
In the latest version of the ts-client this was changed to WeaviateClient
. I suggested a change which wouldn't require an update in the rest of the code, but ideally, everything should be renamed to WeaviateClient
import { IWeaviateClient } from "weaviate-ts-client"; | |
import { type WeaviateClient as IWeaviateClient } from "weaviate-ts-client"; |
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.
Thanx for your feedback and review! Looks good to me...
bf5f830
to
1f34ea6
Compare
Thanks! |
To do
|
Very interested in this, I could really do with switching from Pinecone to Weaviate as Pinecone indexes are currently taking hours to init, on my free account! |
EDIT: Ah nevermind, just as I was typing this I see you have added Original QuestionQuick question, I am working though implementing your weaviate vectorstore directly in my code from your weaviate.ts to get a bit of a head start on migrating away from Pinecone. It would be easier for me and others to switch to weaviate, if you could closely match the Pinecone implementation: langchain/vectorstores/pinecone, to make the migration easier. For example, how can I re-use a weaviate class/index to make a chain similar to how I was with pinecone? const vectorStore = await PineconeStore.fromExistingIndex(
new OpenAIEmbeddings({}),
{
pineconeIndex: index,
textKey: 'text',
namespace: PINECONE_NAME_SPACE,
},
);
//create chain
const chain = makeChain(vectorStore);
//Ask a question using chat history
const response = await chain.call({
question: sanitizedQuestion,
chat_history: history || [],
}); I see you are still adding features, I'll likely take each commit for a spin, happy to provide feedback once I'm at a point where I can run my code again. |
@heresandyboy like this, any questions let me know https://github.com/hwchase17/langchainjs/pull/708/files#diff-7864057947ac7ae65f05b0d922c5c915bab5c41fe4f82b351b05dfeeb512e2d0 |
Yep, thanks! I just spotted your check-in and found that after I'd posted, I was a bit quick to try and get this implemented. You've really come to the rescue with this PR! My demo may yet be saved! Edit: |
* Implemented review comments * Update dep range * Implement missing methods, add filtering * Add entrypoint * Add docs, add examples, improve the types * Disable the test * Add fromExistingIndex * Update example --------- Co-authored-by: Jasper Heidinga <jasper@Jaspers-MBP-2.localdomain> Co-authored-by: Nuno Campos <nuno@boringbits.io>
Basic implementation of the Weaviate vector store