-
Notifications
You must be signed in to change notification settings - Fork 24
feat: add MariaDB store #342
Conversation
2035405
to
032b197
Compare
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.
Awesome! Thanks for working on this.
Just one minor question - and what do you think about adding a compose.yaml
to bring MariaDB to the repo for dev setup?
5d6e995
to
93c0938
Compare
composer.json
Outdated
"codewithkyrian/chromadb-php": "^0.2.1 || ^0.3 || ^0.4", | ||
"codewithkyrian/transformers": "^0.5.3", | ||
"async-aws/bedrock-runtime": "^0.1.0", | ||
"doctrine/dbal": "^4.2", |
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.
could also be, right?
"doctrine/dbal": "^4.2", | |
"doctrine/dbal": "^3.0 || ^4.0", |
we won't see a difference tho without example or test :D
93c0938
to
0e5f563
Compare
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.
Pull Request Overview
This PR introduces a MariaDB-based vector store implementation for enhanced retrieval capabilities. Key changes include the addition of a new MariaDB store class with vector search support, an example demonstrating its usage, and corresponding updates to dependency configurations and environment settings.
- Introduced MariaDB store class (Store.php) with methods for adding documents, querying, and initializing the underlying table.
- Added an example usage script to demonstrate similarity search via the MariaDB store.
- Updated composer.json, compose.yaml, and .env for MariaDB integration.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/Store/Bridge/MariaDB/Store.php | New implementation for MariaDB vector store with query and initialization functions |
examples/store/mariadb-similarity-search.php | Example script to demonstrate similarity search using the MariaDB store |
composer.json | Dependency updates to support PDO and DBAL for MariaDB support |
compose.yaml | Docker configuration for MariaDB 11.7 |
.env | Environment configuration for connecting to MariaDB |
['title' => 'The Godfather', 'description' => 'The aging patriarch of an organized crime dynasty transfers control of his empire to his reluctant son.', 'director' => 'Francis Ford Coppola'], | ||
]; | ||
|
||
// create embeddings and documents |
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.
Consider initializing the $documents array before the foreach loop to ensure clarity and avoid potential undefined variable issues.
// create embeddings and documents | |
// create embeddings and documents | |
$documents = []; |
Copilot uses AI. Check for mistakes.
Getting this error when executing the example:
|
0e5f563
to
bd26570
Compare
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.
Let's merge this - thanks @valtzu!
Related to #28