-
Notifications
You must be signed in to change notification settings - Fork 5
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 vector database #152
base: main
Are you sure you want to change the base?
Conversation
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.
Mostly stylistic comments
|
||
const logger = createLogger('vector-database'); | ||
|
||
export class VectorDB { |
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.
See my comment regarding classes above.
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 highly suggest to keep the DB in class-based approach.
Each db is stateful (connection, indices, indexes and etc), class-based is much cleaner and easier.
We will have multiple instances, and it's natrually telling me to go with class instances.
This PR resolves #151 and partially addresses #120.
I have implemented an in-memory vector database using the library we discussed earlier. The database is designed to support multiple independent instances rather than a single unified one. For example, memories have their own dedicated database, and documents are stored in a separate one. Test cases have been developed to ensure the functionality of the vector database.
Additionally, I have added a script with a CLI command to resurrect or download memories, starting from the latest state and tracing back to genesis.
In a future PR, we can work on integrating the vector database into the workflow to enhance its functionality.