A web based chat interface built on Cloudflare Pages that allows for exploring Text Generation models on Cloudflare Workers AI. Design is built using tailwind.
This demo makes use of LocalStorage to maintain state. We have better solutions available (moar coming soon).
This is, like all of us, a Work in Progress.
npm install
# If this is your first time here
npx wrangler login
This uses the local Vite server for rapid development
npm run dev
This builds and runs in Wrangler your site locally, just as it will run on production
npm run preview
This hosts your site on Cloudflare Pages
npm run deploy
npx wrangler pages deployment tail
If you are on a Mac, you can generate the list of models in script.js by running the following commands:
# If this is your first time here. You won't regret it.
brew install jq
# Filter all Text Generation models into "ga" and "beta"
npx wrangler ai models --json | jq '
reduce .[] as $item (
{beta: [], ga: []};
if ($item.task.name == "Text Generation") then
if ($item.properties | any(.property_id == "beta" and .value == "true")) then
.beta += [$item.name]
else
.ga += [$item.name]
end
else
.
end
) |
.beta |= sort |
.ga |= sort
'
- Add help area
- Change settings to be "advanced" mode.
- Get access in front of it
- Use D1 for Session state