Skip to content

Commit 53d5e95

Browse files
committed
[Store][ChromaDb] Split ChromaDb store as dedicated package
Similar to how tools were split in the Agent component, this extracts the ChromaDb store into its own standalone package with: - Independent composer.json with proper dependencies - Dedicated test suite with phpunit.xml.dist - Standard package files (LICENSE, README.md, CHANGELOG.md) - GitHub integration files for subtree split workflow
1 parent 917cab3 commit 53d5e95

File tree

11 files changed

+165
-5
lines changed

11 files changed

+165
-5
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/Tests export-ignore
2+
/phpunit.xml.dist export-ignore
3+
/.git* export-ignore
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Please do not submit any Pull Requests here. They will be closed.
2+
---
3+
4+
Please submit your PR here instead:
5+
https://github.com/symfony/ai
6+
7+
This repository is what we call a "subtree split": a read-only subset of that main repository.
8+
We're looking forward to your PR there!
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Close Pull Request
2+
3+
on:
4+
pull_request_target:
5+
types: [opened]
6+
7+
jobs:
8+
run:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: superbrothers/close-pull-request@v3
12+
with:
13+
comment: |
14+
Thanks for your Pull Request! We love contributions.
15+
16+
However, you should instead open your PR on the main repository:
17+
https://github.com/symfony/ai
18+
19+
This repository is what we call a "subtree split": a read-only subset of that main repository.
20+
We're looking forward to your PR there!
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
vendor/
2+
composer.lock
3+
phpunit.xml
4+
.phpunit.result.cache
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CHANGELOG
2+
=========
3+
4+
0.1
5+
---
6+
7+
* Add the bridge
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2025-present Fabien Potencier
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
ChromaDB Store
2+
==============
3+
4+
Provides [ChromaDB](https://www.trychroma.com/) vector store integration for Symfony AI Store.
5+
6+
Resources
7+
---------
8+
9+
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
10+
* [Report issues](https://github.com/symfony/ai/issues) and
11+
[send Pull Requests](https://github.com/symfony/ai/pulls)
12+
in the [main Symfony AI repository](https://github.com/symfony/ai)

src/store/src/Bridge/ChromaDb/Store.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Symfony\AI\Platform\Vector\Vector;
1616
use Symfony\AI\Store\Document\Metadata;
1717
use Symfony\AI\Store\Document\VectorDocument;
18-
use Symfony\AI\Store\Exception\RuntimeException;
1918
use Symfony\AI\Store\StoreInterface;
2019
use Symfony\Component\Uid\Uuid;
2120

@@ -28,9 +27,6 @@ public function __construct(
2827
private readonly Client $client,
2928
private readonly string $collectionName,
3029
) {
31-
if (!class_exists(Client::class)) {
32-
throw new RuntimeException('For using the ChromaDB as retrieval vector store, the codewithkyrian/chromadb-php package is required. Try running "composer require codewithkyrian/chromadb-php".');
33-
}
3430
}
3531

3632
public function add(VectorDocument ...$documents): void

src/store/tests/Bridge/ChromaDb/StoreTest.php renamed to src/store/src/Bridge/ChromaDb/Tests/StoreTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\AI\Store\Tests\Bridge\ChromaDb;
12+
namespace Symfony\AI\Store\Bridge\ChromaDb\Tests;
1313

1414
use Codewithkyrian\ChromaDB\Client;
1515
use Codewithkyrian\ChromaDB\Generated\Responses\QueryItemsResponse;
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"name": "symfony/ai-chromadb-store",
3+
"description": "ChromaDB vector store bridge for Symfony applications.",
4+
"license": "MIT",
5+
"type": "symfony-ai-store",
6+
"keywords": [
7+
"ai",
8+
"bridge",
9+
"chromadb",
10+
"store",
11+
"vector"
12+
],
13+
"authors": [
14+
{
15+
"name": "Christopher Hertel",
16+
"email": "mail@christopher-hertel.de"
17+
},
18+
{
19+
"name": "Oskar Stark",
20+
"email": "oskarstark@googlemail.com"
21+
},
22+
{
23+
"name": "Symfony Community",
24+
"homepage": "https://symfony.com/contributors"
25+
}
26+
],
27+
"require": {
28+
"php": ">=8.2",
29+
"codewithkyrian/chromadb-php": "^0.2.1|^0.3|^0.4",
30+
"symfony/ai-store": "@dev",
31+
"symfony/uid": "^7.3|^8.0"
32+
},
33+
"require-dev": {
34+
"phpunit/phpunit": "^11.5.13"
35+
},
36+
"minimum-stability": "dev",
37+
"autoload": {
38+
"psr-4": {
39+
"Symfony\\AI\\Store\\Bridge\\ChromaDb\\": ""
40+
}
41+
},
42+
"autoload-dev": {
43+
"psr-4": {
44+
"Symfony\\AI\\Store\\Bridge\\ChromaDb\\Tests\\": "Tests/"
45+
}
46+
},
47+
"config": {
48+
"sort-packages": true
49+
},
50+
"extra": {
51+
"branch-alias": {
52+
"dev-main": "0.x-dev"
53+
},
54+
"thanks": {
55+
"name": "symfony/ai",
56+
"url": "https://github.com/symfony/ai"
57+
}
58+
}
59+
}

0 commit comments

Comments
 (0)