RAG - Retrieval Augmented Generation. This is the Jacked initiative for that within the PHP ecosystem.
Sample credentials:
Username: jekyll@example.com
Password: password
Before start you need to make sure you have the following dependencies:
- php8.2 or higher
- php openswoole extension
- docker
Clone the repository:
git clone https://github.com/Jacked-PHP/insight my-projectThen cd my-project
Install dependencies (php composer and npm):
composer installnpm installnpm run build(or npm run dev if you are developing and want the hot reload)
Prepare the database:
docker-compose up -dMake sure your .env is properly set:
- have db credentials
- app key (
php artisan key:generate) - app url (default is
http://localhost:8000)
Then run the migrations:
php artisan migrate:fresh --seedRun the server (this is running jacked server):
docker compose up -dNow you can visit http://localhost:8080 and see the application running.
There are a few options for vector DB. This project's sample version starts with a Filesystem solution. It is recommended to visit https://github.com/LLPhant/LLPhant for more information since the llm solution is built on top of that.
The recommended models for embedding are:
To run Ollama, a suggested way would be to run through docker:
# Consider network parameter if you want to connect to the same network as the php service.
docker run -d -v ollama:$HOME/.ollama -p 11434:11434 --name ollama ollama/ollamaReference: https://github.com/ollama/ollama/blob/main/docs/docker.md
This project also runs on NativePHP.
