-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add vespa as Vectordb #1676
Add vespa as Vectordb #1676
Conversation
Can you also add a cookbook for this? |
I haven’t added the cookbook for this yet. I will include it in a subsequent PR. Thank you for bringing this to my attention, @manthanguptaa. |
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.
Please make it consistent with the other cookbooks. Here is an example
https://github.com/phidatahq/phidata/blob/main/cookbook/vectordb/chroma_db.py
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.
ok @manthanguptaa, I will raise another pull request with the mentioned considerations for the cookbook
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.
Add steps on top of the file on how to run vespa
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.
I will add @manthanguptaa all the steps on how to run Vespa at the top of the file. I will ensure the instructions are clear and easy to follow.
try: | ||
import vespa # type: ignore | ||
except ImportError: | ||
raise ImportError("`vespa` not installed.") |
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.
raise ImportError("
vespanot installed. Please install using
pip install vespa")
or whatever the correct way is
@@ -0,0 +1,30 @@ | |||
# install vespa - `pip install phi-vespa` |
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.
what's phi-vespa?
vector_db = VespaDb( | ||
app_name="recipes", | ||
url="http://localhost:8080", | ||
schema={ | ||
"fields": { | ||
"text": {"type": "string"}, | ||
"embedding": {"type": "tensor(x[384])", "attribute": True}, | ||
"metadata": {"type": "string", "attribute": True} | ||
} | ||
} | ||
) |
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.
Your VespaDb class takes uri
as param and not url
. Please make sure to thoroughly test your code before raising a PR
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.
Also there is no schema field in your VespaDb class
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.
Your code isn't working at all. Please test before raising a PR. It will save a lot of to and fro on both ends. It is okay to use AI to code but you will have to test it on your end as well.
Thank you for your feedback. @manthanguptaa I apologize for the oversight I've made and will ensure to test the code again by correcting those on my end before raising a PR moving forward. |
Closing due to inactivity |
VespaDb Vector Database Implementation
Description
VectorDb
implementation using Vespa to support vector and hybrid search capabilities. This class integrates embedding and reranking functionalities, supports document upsert, and uses Vespa's querying system for search operations.vespa
Python package). Ensure the Vespa instance is running locally or accessible at the specified URI.Setup Instructions
http://localhost:8080
or configure the correct URI.Usage
Creating a VespaDb Instance
Inserting Documents
Performing Searches
Hybrid Search
Dropping the Database
Development Notes