-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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/Add support for weaviate vector db #782
Conversation
@Dev-Khant for your reference |
Codecov ReportAttention:
... and 8 files with indirect coverage changes 📢 Thoughts on this report? Let us know!. |
Thanks, I will go through it |
@rupeshbansal thanks for adding the support. Although, I think there are some issues with the integration which I found out when testing with the weaviate sandbox. Issues:
In [1]: from embedchain import CustomApp
...: from embedchain.embedder.openai import OpenAIEmbedder
...: from embedchain.llm.openai import OpenAILlm
...: from embedchain.vectordb.weaviate import WeaviateDb
In [3]: import os
...:
...: os.environ['WEAVIATE_ENDPOINT'] = 'https://xxx'
...: os.environ['WEAVIATE_API_KEY'] = 'xxx'
In [4]: app = CustomApp(llm=OpenAILlm(), embedder=OpenAIEmbedder(), db=WeaviateDb())
WARNING:root:DEPRECATION WARNING: Please use `App` instead of `CustomApp`. `CustomApp` will be removed in a future release. Please refer to https://docs.embedchain.ai/advanced/app_types#opensourceapp for instructions.
In [5]: app.query("What is the net worth of Elon musk?")
Out[5]: "As of September 2021, Elon Musk's net worth is estimated to be around $250 billion, making him one of the wealthiest individuals in the world. However, please note that net worth can fluctuate over time due to various factors such as stock market fluctuations and business ventures."
In [6]: app.add("https://www.forbes.com/profile/elon-musk")
Successfully saved https://www.forbes.com/profile/elon-musk (DataType.WEB_PAGE). New chunks count: 13
Out[6]: '8cf46026cabf9b05394a2658bd1fe890'
In [7]: app.query("What is the net worth of Elon musk?")
Out[7]: "As of September 2021, Elon Musk's net worth is estimated to be around $250 billion, making him one of the wealthiest individuals in the world. However, please note that net worth can fluctuate over time due to various factors such as stock market fluctuations and business ventures."
In [8]: app.add("https://en.wikipedia.org/wiki/Elon_Musk")
...: app.add("https://www.forbes.com/profile/elon-musk")
Successfully saved https://en.wikipedia.org/wiki/Elon_Musk (DataType.WEB_PAGE). New chunks count: 367
Successfully saved https://www.forbes.com/profile/elon-musk (DataType.WEB_PAGE). New chunks count: 13
Out[8]: '8cf46026cabf9b05394a2658bd1fe890' |
Thanks for the thorough review. Have addressed the comments. Requesting review please! |
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.
Works great. Left some minor comments which I can take care of.
Description
Adding support for weaviate vector database
Fixes #436
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please delete options that are not relevant.
Checklist:
Maintainer Checklist