You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-4
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@
3
3
Simple Symfony demo application on top of [LLM Chain](https://github.com/php-llm/llm-chain) and its [integration bundle](https://github.com/php-llm/llm-chain-bundle).
4
4
5
5
## Examples
6
+
6
7

7
8
8
9
## Requirements
@@ -34,6 +35,7 @@ The setup is split into three parts, the Symfony application, the OpenAI configu
34
35
### 1. Symfony App
35
36
36
37
Checkout the repository, start the docker environment and install dependencies:
38
+
37
39
```shell
38
40
git clone git@github.com:php-llm/symfony-demo.git
39
41
cd symfony-demo
@@ -44,12 +46,20 @@ docker compose run composer install
44
46
Now you should be able to open https://localhost/ in your browser,
45
47
and the chatbot UI should be available for you to start chatting.
46
48
49
+
> [!NOTE]
50
+
> You might have to bypass the security warning of your browser with regard to self-signed certificates.
51
+
47
52
### 2. OpenAI Configuration
48
53
49
54
For using GPT and embedding models from OpenAI, you need to configure an OpenAI API key as environment variable.
50
55
This requires you to have an OpenAI account, create a valid API key and set it as `OPENAI_API_KEY` in `.env.local` file.
51
56
57
+
```shell
58
+
echo"OPENAI_API_KEY='sk-...'"> .env.local
59
+
```
60
+
52
61
Verify the success of this step by running the following command:
62
+
53
63
```shell
54
64
docker compose exec app bin/console debug:dotenv
55
65
```
@@ -58,23 +68,25 @@ You should be able to see the `OPENAI_API_KEY` in the list of environment variab
58
68
59
69
### 3. Chroma DB Initialization
60
70
61
-
The Chroma DB is a vector store that is used to store embeddings of the chatbot's context.
71
+
The [Chroma DB](https://www.trychroma.com/) is a vector store that is used to store embeddings of the chatbot's context.
62
72
63
73
To initialize the Chroma DB, you need to run the following command:
**Don't forget to set up the project in your favorite IDE or editor.**
85
+
**Don't forget to set up the project in your favorite IDE or editor.**
74
86
75
87
## Functionality
76
88
77
89
* The chatbot application is a simple and small Symfony 7.2 application.
78
-
* The UI is coupled to a Twig LiveComponent, that integrates different `Chat` implementations on top of the user's session.
90
+
* The UI is coupled to a [Twig LiveComponent](https://symfony.com/bundles/ux-live-component/current/index.html), that integrates different `Chat` implementations on top of the user's session.
79
91
* You can reset the chat context by hitting the `Reset` button in the top right corner.
80
-
* You find three different usage scenarios in the upper navbar.
92
+
* You find three different usage scenarios in the upper navbar.
0 commit comments