Skip to content

Commit 2817e66

Browse files
authoredDec 14, 2024
docs: minor readme improvements (#8)
1 parent 8c096f0 commit 2817e66

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed
 

‎README.md

+16-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
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).
44

55
## Examples
6+
67
![demo.png](demo.png)
78

89
## Requirements
@@ -34,6 +35,7 @@ The setup is split into three parts, the Symfony application, the OpenAI configu
3435
### 1. Symfony App
3536

3637
Checkout the repository, start the docker environment and install dependencies:
38+
3739
```shell
3840
git clone git@github.com:php-llm/symfony-demo.git
3941
cd symfony-demo
@@ -44,12 +46,20 @@ docker compose run composer install
4446
Now you should be able to open https://localhost/ in your browser,
4547
and the chatbot UI should be available for you to start chatting.
4648

49+
> [!NOTE]
50+
> You might have to bypass the security warning of your browser with regard to self-signed certificates.
51+
4752
### 2. OpenAI Configuration
4853

4954
For using GPT and embedding models from OpenAI, you need to configure an OpenAI API key as environment variable.
5055
This requires you to have an OpenAI account, create a valid API key and set it as `OPENAI_API_KEY` in `.env.local` file.
5156

57+
```shell
58+
echo "OPENAI_API_KEY='sk-...'" > .env.local
59+
```
60+
5261
Verify the success of this step by running the following command:
62+
5363
```shell
5464
docker compose exec app bin/console debug:dotenv
5565
```
@@ -58,23 +68,25 @@ You should be able to see the `OPENAI_API_KEY` in the list of environment variab
5868

5969
### 3. Chroma DB Initialization
6070

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.
6272

6373
To initialize the Chroma DB, you need to run the following command:
74+
6475
```shell
6576
docker compose exec app bin/console app:blog:embed -vv
6677
```
6778

6879
Now you should be able to run the test command and get some results:
80+
6981
```shell
7082
docker compose exec app bin/console app:chroma:test
7183
```
7284

73-
**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.**
7486

7587
## Functionality
7688

7789
* 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.
7991
* 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

Comments
 (0)
Please sign in to comment.