Giter VIP home page Giter VIP logo

worker_test's Introduction

Vanilla JavaScript Chat Application using Cloudflare Workers AI

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 a template repository. Please feel free to create your own repository from this one by using the "Use this template" button. It's right next to the ⭐️ this repo button, which you could totally do as well if you wanted to.

This is, like all of us, a Work in Progress.

Installation

npm install
# If this is your first time here
npx wrangler login

Develop

This uses the local Vite server for rapid development

npm run dev

Preview

This builds and runs in Wrangler your site locally, just as it will run on production

npm run preview

Deploy

This hosts your site on Cloudflare Pages

npm run deploy

Debug

npx wrangler pages deployment tail

Advanced

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
'

worker_test's People

Contributors

tomipardinas avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.