Cloudflare Workers
1. Go to cloudflare.com and log in.
2. In your dashboard go to Workers & Pages and then Workers & Pages.
3. Click Create button, find Start from a template and pick LLM App.
4. Name your worker however you want and click Deploy.
5. Continue to the project.
6. In Deployments tab find the edit code button, should be top right.
7. Paste the code below in the editor.
8. Click Deploy go back to the dashboard.
9. In the Settings tab under Domains & Routes copy the active worker domain ( should be smth like name.email.workers.dev ) and paste it under /settings into AI Worker.
10. That's it, you can now play around with different models and redeploy any change to the worker that you want.
The model can be selected in /settings , speed and results will depend on the size of the model, you can find the full list of models here.
AI Worker Code
Read more