This is a Laravel 11 web app having integrated Cloudflare Workers AI that write stories on any given topic.
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)
- 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/StoryTellerAI.git
Go to installation directory
cd StoryTellerAI
Install dependencies
composer instasll
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_MODEL_ID="@cf/meta/llama-3.1-8b-instruct"
WORKERS_API_TOKEN=""
WORKERS_ACCOUNT_ID=""
Migrate database
php artisan migrate
Serve project
php artisan serve