{"id":21930040,"url":"https://github.com/php-llm/llm-chain-symfony-demo","last_synced_at":"2025-10-09T18:30:35.371Z","repository":{"id":264356863,"uuid":"875366171","full_name":"php-llm/llm-chain-symfony-demo","owner":"php-llm","description":"Symfony Demo Chat Application","archived":false,"fork":false,"pushed_at":"2025-07-06T18:30:26.000Z","size":1078,"stargazers_count":49,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-06T19:34:47.615Z","etag":null,"topics":["demo","gpt","llm","php","symfony"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/php-llm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-19T19:26:20.000Z","updated_at":"2025-07-06T18:30:27.000Z","dependencies_parsed_at":"2024-11-23T17:27:11.076Z","dependency_job_id":"e43f8374-e5d1-44b3-87ed-a8567565c07f","html_url":"https://github.com/php-llm/llm-chain-symfony-demo","commit_stats":null,"previous_names":["php-llm/symfony-demo","php-llm/llm-chain-symfony-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/php-llm/llm-chain-symfony-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-llm%2Fllm-chain-symfony-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-llm%2Fllm-chain-symfony-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-llm%2Fllm-chain-symfony-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-llm%2Fllm-chain-symfony-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php-llm","download_url":"https://codeload.github.com/php-llm/llm-chain-symfony-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-llm%2Fllm-chain-symfony-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001947,"owners_count":26083226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["demo","gpt","llm","php","symfony"],"created_at":"2024-11-28T23:07:25.306Z","updated_at":"2025-10-09T18:30:35.366Z","avatar_url":"https://github.com/php-llm.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LLM Chain - Symfony Demo Chatbot Application\n\n\u003e [!IMPORTANT]  \n\u003e **PHP LLM becomes Symfony AI** - this project moved to [github.com/symfony/ai](https://github.com/symfony/ai).\n\u003e Please use the new repository for all future development, issues, and contributions.\n\u003e Thanks for your contributions - we hope to see you at Symfony AI!\n\nSimple 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).\n\n## Examples\n\n![demo.png](demo.png)\n\n## Requirements\n\nWhat you need to run this demo:\n\n* Internet Connection\n* Terminal \u0026 Browser\n* [Git](https://git-scm.com/) \u0026 [GitHub Account](https://github.com)\n* [Docker](https://www.docker.com/) with [Docker Compose Plugin](https://docs.docker.com/compose/)\n* Your Favorite IDE or Editor\n* An [OpenAI API Key](https://platform.openai.com/docs/api-reference/create-and-export-an-api-key)\n\n## Technology\n\nThis small demo sits on top of following technologies:\n\n* [PHP \u003e= 8.4](https://www.php.net/releases/8.4/en.php)\n* [Symfony 7.2 incl. Twig, Asset Mapper \u0026 UX](https://symfony.com/)\n* [Bootstrap 5](https://getbootstrap.com/docs/5.0/getting-started/introduction/)\n* [OpenAI's GPT \u0026 Embeddings](https://platform.openai.com/docs/overview)\n* [ChromaDB Vector Store](https://www.trychroma.com/)\n* [FrankenPHP](https://frankenphp.dev/)\n\n## Setup\n\nThe setup is split into three parts, the Symfony application, the OpenAI configuration, and initializing the Chroma DB.\n\n### 1. Symfony App\n\nCheckout the repository, start the docker environment and install dependencies:\n\n```shell\ngit clone git@github.com:php-llm/llm-chain-symfony-demo.git\ncd llm-chain-symfony-demo\ndocker compose up -d\ndocker compose run composer install\n```\n\nNow you should be able to open https://localhost/ in your browser,\nand the chatbot UI should be available for you to start chatting.\n\n\u003e [!NOTE]  \n\u003e You might have to bypass the security warning of your browser with regard to self-signed certificates.\n\n### 2. OpenAI Configuration\n\nFor using GPT and embedding models from OpenAI, you need to configure an OpenAI API key as environment variable.\nThis requires you to have an OpenAI account, create a valid API key and set it as `OPENAI_API_KEY` in `.env.local` file.\n\n```shell\necho \"OPENAI_API_KEY='sk-...'\" \u003e .env.local\n```\n\nVerify the success of this step by running the following command:\n\n```shell\ndocker compose exec app bin/console debug:dotenv\n```\n\nYou should be able to see the `OPENAI_API_KEY` in the list of environment variables.\n\n### 3. Chroma DB Initialization\n\nThe [Chroma DB](https://www.trychroma.com/) is a vector store that is used to store embeddings of the chatbot's context.\n\nTo initialize the Chroma DB, you need to run the following command:\n\n```shell\ndocker compose exec app bin/console app:blog:embed -vv\n```\n\nNow you should be able to run the test command and get some results:\n\n```shell\ndocker compose exec app bin/console app:blog:query\n```\n\n**Don't forget to set up the project in your favorite IDE or editor.**\n\n## Functionality\n\n* The chatbot application is a simple and small Symfony 7.2 application.\n* 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.\n* You can reset the chat context by hitting the `Reset` button in the top right corner.\n* You find three different usage scenarios in the upper navbar.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-llm%2Fllm-chain-symfony-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp-llm%2Fllm-chain-symfony-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-llm%2Fllm-chain-symfony-demo/lists"}