Skip to content
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

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Feat/Add vector database #152

wants to merge 17 commits into from

Conversation

Xm0onh
Copy link
Member

@Xm0onh Xm0onh commented Jan 17, 2025

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.

@Xm0onh Xm0onh requested a review from jfrank-summit January 17, 2025 20:07
@jfrank-summit jfrank-summit changed the title Feat/af vcdb Feat/Add vector database Jan 17, 2025
Copy link
Member

@jfrank-summit jfrank-summit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly stylistic comments

src/agents/tools/utils/dsn/dsnDownload.ts Outdated Show resolved Hide resolved
src/agents/tools/utils/dsn/retry.ts Outdated Show resolved Hide resolved
src/cli/resurrect.ts Outdated Show resolved Hide resolved
src/utils/resurrection.ts Outdated Show resolved Hide resolved

const logger = createLogger('vector-database');

export class VectorDB {
Copy link
Member

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.

Copy link
Member Author

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.

@Xm0onh Xm0onh requested a review from jfrank-summit January 17, 2025 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Vector database
2 participants