Skip to content

Commit 9cb4a74

Browse files
committed
Switch to Symfony CLI for demo
1 parent bf941b4 commit 9cb4a74

File tree

5 files changed

+11
-22
lines changed

5 files changed

+11
-22
lines changed

demo/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ APP_SECRET=ccb9dca72dce53c683eaaf775bfdb253
2020
###< symfony/framework-bundle ###
2121

2222
CHROMADB_HOST=chromadb
23+
CHROMADB_PORT=8080
2324
OPENAI_API_KEY=sk-...

demo/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ Checkout the repository, start the docker environment and install dependencies:
3939
```shell
4040
git clone [email protected]:symfony/ai-demo.git
4141
cd ai-demo
42+
composer install
4243
docker compose up -d
43-
docker compose run composer install
44+
symfony serve -d
4445
```
4546

46-
Now you should be able to open https://localhost/ in your browser,
47+
Now you should be able to open https://localhost:8000/ in your browser,
4748
and the chatbot UI should be available for you to start chatting.
4849

4950
> [!NOTE]
@@ -61,7 +62,7 @@ echo "OPENAI_API_KEY='sk-...'" > .env.local
6162
Verify the success of this step by running the following command:
6263

6364
```shell
64-
docker compose exec app bin/console debug:dotenv
65+
symfony console debug:dotenv
6566
```
6667

6768
You should be able to see the `OPENAI_API_KEY` in the list of environment variables.
@@ -73,13 +74,13 @@ The [Chroma DB](https://www.trychroma.com/) is a vector store that is used to st
7374
To initialize the Chroma DB, you need to run the following command:
7475

7576
```shell
76-
docker compose exec app bin/console app:blog:embed -vv
77+
symfony console app:blog:embed -vv
7778
```
7879

7980
Now you should be able to run the test command and get some results:
8081

8182
```shell
82-
docker compose exec app bin/console app:blog:query
83+
symfony console app:blog:query
8384
```
8485

8586
**Don't forget to set up the project in your favorite IDE or editor.**
@@ -115,7 +116,7 @@ To add the server, add the following configuration to your MCP Client's settings
115116
You can test the MCP server by running the following command to start the MCP client:
116117

117118
```shell
118-
php bin/console mcp:server
119+
symfony console mcp:server
119120
```
120121

121122
Then, paste `{"method":"tools/list","jsonrpc":"2.0","id":1}` to list the tools available on the MCP server.

demo/compose.yaml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11
services:
2-
app:
3-
image: dunglas/frankenphp
4-
volumes:
5-
- ./:/app
6-
ports:
7-
- 443:443
8-
tty: true
9-
10-
composer:
11-
image: composer:latest
12-
volumes:
13-
- ./:/app
14-
152
chromadb:
163
image: chromadb/chroma:0.5.23
4+
ports:
5+
- '8080:8000'
176
volumes:
187
- ./chromadb:/chroma/chroma
198
environment:

demo/composer.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@
7171
"symfony/flex": true,
7272
"symfony/runtime": true
7373
},
74-
"platform": {
75-
"php": "8.4.7"
76-
},
7774
"sort-packages": true
7875
},
7976
"extra": {

demo/config/packages/chromadb.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ services:
22
Codewithkyrian\ChromaDB\Factory:
33
calls:
44
- withHost: ['%env(CHROMADB_HOST)%']
5+
- withPort: ['%env(CHROMADB_PORT)%']
56

67
Codewithkyrian\ChromaDB\Client:
78
factory: ['@Codewithkyrian\ChromaDB\Factory', 'connect']

0 commit comments

Comments
 (0)