This is a Laravel 11
&& Vue 3
web app having integrated multiple type of Cloudflare Workers AI APIs.
Zight.Recording.2024-10-09.at.02.26.57.PM.mp4
Main reason is, it offers unlimited API requests (at least while creating this app, but not sure about future) for any model that is in beta, and free 10K Neurons/month for stable models. So you can create and test as many apps without any worry about the request limits or tokens.
- WAMP/LAMP/XAMP (You will love Laragon)
- PHP 8.3^ (Download here)
- Node 18^ (Download here)
- Composer
- Cloudflare Account ID (learn more)
- Cloudflare API Token (Create one with Workers AI Template)
- AI Model ID (learn more)
You can read complete Workers AI API documentation here
Clone the repo in your system
git clone https://github.com/souravdutt/ai-hub.git
Go to installation directory
cd ai-hub
Install dependencies
composer instasll
npm install
Create .env
file
cp .env.example .env
Generate App Key
php artisan key:generate
Open project in VS Code
code .
Change below environment variables accordingly in your .env
file
WORKERS_API_TOKEN=
WORKERS_ACCOUNT_ID=
Migrate database
php artisan migrate
Start node server
npm run dev
Serve project
php artisan serve
Open http://127.0.0.1:8000/
or http://ai-hub.test
whichever suitable as per your local setup.