Skip to content

Commit dadf408

Browse files
authored
Merge branch 'main' into feature/fixChromaDbStore
2 parents 88efb84 + 060e4b1 commit dadf408

File tree

103 files changed

+2861
-465
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+2861
-465
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ai.symfony.com @javiereguiluz
12
demo @chr-hertel @OskarStark
23
examples @chr-hertel @OskarStark
34
fixtures @chr-hertel @OskarStark

.github/workflows/doctor-rst.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ jobs:
3434
key: doctor-rst-${{ steps.extract_base_branch.outputs.branch }}
3535

3636
- name: DOCtor-RST
37-
uses: docker://oskarstark/doctor-rst:1.70.2
37+
uses: docker://oskarstark/doctor-rst:1.72.0
3838
with:
3939
args: --short --error-format=github --cache-file=/github/workspace/.cache/doctor-rst.cache

.github/workflows/integration-tests.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ jobs:
104104
composer-options: "--no-scripts"
105105
working-directory: demo
106106

107+
- name: Link local packages
108+
working-directory: demo
109+
run: ../link
110+
107111
- run: composer run-script auto-scripts --no-interaction
108112
working-directory: demo
109113

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
return (new PhpCsFixer\Config())
3131
// @see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7777
3232
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
33+
->setUnsupportedPhpVersionAllowed(true)
3334
->setRules([
3435
'@Symfony' => true,
3536
'@Symfony:risky' => true,

demo/AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ composer install
3131
echo "OPENAI_API_KEY='sk-...'" > .env.local
3232

3333
# Initialize vector store
34-
symfony console app:blog:embed -vv
35-
symfony console app:blog:query
34+
symfony console ai:store:index blog -vv
35+
symfony console ai:store:retrieve blog "Week of Symfony"
3636

3737
# Start server
3838
symfony serve -d

demo/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ echo "OPENAI_API_KEY='sk-...'" > .env.local
3939
symfony console ai:store:index blog -vv
4040

4141
# Test vector store
42-
symfony console app:blog:query
42+
symfony console ai:store:retrieve blog "Week of Symfony"
4343

4444
# Start development server
4545
symfony serve -d

demo/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ To initialize the Chroma DB, you need to run the following command:
7777
symfony console ai:store:index blog -vv
7878
```
7979

80-
Now you should be able to run the test command and get some results:
80+
Now you should be able to retrieve documents from the store:
8181

8282
```shell
83-
symfony console app:blog:query
83+
symfony console ai:store:retrieve blog "Week of Symfony"
8484
```
8585

8686
**Don't forget to set up the project in your favorite IDE or editor.**

demo/config/packages/ai.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ ai:
100100
- 'Symfony\AI\Store\Document\Transformer\TextTrimTransformer'
101101
vectorizer: 'ai.vectorizer.openai'
102102
store: 'ai.store.chroma_db.symfonycon'
103+
retriever:
104+
blog:
105+
vectorizer: 'ai.vectorizer.openai'
106+
store: 'ai.store.chroma_db.symfonycon'
103107

104108
services:
105109
_defaults:

demo/src/Blog/Command/QueryCommand.php

Lines changed: 0 additions & 71 deletions
This file was deleted.

deptrac.yaml

Lines changed: 85 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,105 @@ deptrac:
22
paths:
33
- ./src
44
exclude_files:
5-
- '#.*test.*#'
5+
- '#.*test.*#i'
66
- '#.*vendor.*#'
77
layers:
8-
- name: Agent
8+
- name: AgentComponent
99
collectors:
1010
- type: classLike
11-
value: Symfony\\AI\\Agent.*
12-
- name: Chat
11+
value: ^Symfony\\AI\\Agent\\(?!Bridge\\).*
12+
- name: BraveTool
13+
collectors:
14+
- type: classLike
15+
value: Symfony\\AI\\Agent\\Bridge\\Brave\\.*
16+
- name: ClockTool
17+
collectors:
18+
- type: classLike
19+
value: Symfony\\AI\\Agent\\Bridge\\Clock\\.*
20+
- name: FirecrawlTool
21+
collectors:
22+
- type: classLike
23+
value: Symfony\\AI\\Agent\\Bridge\\Firecrawl\\.*
24+
- name: MapboxTool
25+
collectors:
26+
- type: classLike
27+
value: Symfony\\AI\\Agent\\Bridge\\Mapbox\\.*
28+
- name: OpenMeteoTool
29+
collectors:
30+
- type: classLike
31+
value: Symfony\\AI\\Agent\\Bridge\\OpenMeteo\\.*
32+
- name: ScraperTool
33+
collectors:
34+
- type: classLike
35+
value: Symfony\\AI\\Agent\\Bridge\\Scraper\\.*
36+
- name: SerpApiTool
37+
collectors:
38+
- type: classLike
39+
value: Symfony\\AI\\Agent\\Bridge\\SerpApi\\.*
40+
- name: SimilaritySearchTool
41+
collectors:
42+
- type: classLike
43+
value: Symfony\\AI\\Agent\\Bridge\\SimilaritySearch\\.*
44+
- name: TavilyTool
45+
collectors:
46+
- type: classLike
47+
value: Symfony\\AI\\Agent\\Bridge\\Tavily\\.*
48+
- name: WikipediaTool
49+
collectors:
50+
- type: classLike
51+
value: Symfony\\AI\\Agent\\Bridge\\Wikipedia\\.*
52+
- name: YoutubeTool
53+
collectors:
54+
- type: classLike
55+
value: Symfony\\AI\\Agent\\Bridge\\Youtube\\.*
56+
- name: ChatComponent
1357
collectors:
1458
- type: classLike
1559
value: Symfony\\AI\\Chat.*
16-
- name: Platform
60+
- name: PlatformComponent
1761
collectors:
1862
- type: classLike
1963
value: Symfony\\AI\\Platform.*
20-
- name: Store
64+
- name: StoreComponent
2165
collectors:
2266
- type: classLike
2367
value: Symfony\\AI\\Store.*
2468
ruleset:
25-
Agent:
26-
- Platform
27-
- Store
28-
Chat:
29-
- Agent
30-
- Platform
31-
Platform: ~
32-
Store:
33-
- Platform
69+
AgentComponent:
70+
- PlatformComponent
71+
- StoreComponent
72+
BraveTool:
73+
- AgentComponent
74+
- PlatformComponent
75+
ClockTool:
76+
- AgentComponent
77+
FirecrawlTool:
78+
- AgentComponent
79+
MapboxTool:
80+
- AgentComponent
81+
- PlatformComponent
82+
OpenMeteoTool:
83+
- AgentComponent
84+
- PlatformComponent
85+
ScraperTool:
86+
- AgentComponent
87+
SerpApiTool:
88+
- AgentComponent
89+
SimilaritySearchTool:
90+
- AgentComponent
91+
- StoreComponent
92+
TavilyTool:
93+
- AgentComponent
94+
WikipediaTool:
95+
- AgentComponent
96+
YoutubeTool:
97+
- AgentComponent
98+
ChatComponent:
99+
- AgentComponent
100+
- PlatformComponent
101+
PlatformComponent: ~
102+
StoreComponent:
103+
- PlatformComponent
34104
# Baseline of known violations to be skipped for now
35105
skip_violations:
36106
Symfony\AI\Platform\Bridge\Anthropic\TokenOutputProcessor: [Symfony\AI\Agent\OutputProcessorInterface, Symfony\AI\Agent\Output]

0 commit comments

Comments
 (0)