Giter VIP home page Giter VIP logo

chatcloudflare's Introduction

ChatCloudflare

Want to give Cloudflare Workers AI a try? This repo can help you get started quickly with a chat application built using Next.js, Tailwindcss and Workers AI. Based on Nashex's wonderful GPT-4 Playground repo.

Demo

Mock ChatGPT Environment

This environment has most of the critical features like conversation history (which is stored locally), prompting, and multiple conversations. This environment is a great way to see what kind of responses!

Playground Environment

This environment lets you test out different system prompts and see how they shift the responses you'll get from Workers AI.

Running Locally

To run this project locally, you will need to have Node.js installed. Once you have Node.js installed, you can clone this repository and run the following commands:

yarn install
npx @cloudflare/next-on-pages
npx wrangler pages dev .vercel/output/static --compatibility-flag=nodejs_compat --binding CLOUDFLARE_ACCOUNT_ID=%YOURCLOUDFLAREACCOUNT% CLOUDFLARE_API_KEY=%YOURCLOUDFLAREAPIKEY%

This will start a local server on port 8788. You can then navigate to http://127.0.0.1:8788 to view the project!

Deploying to Cloudflare Pages

You can deploy this applicatin to Cloudflare Pages by running the following commands:

npx @cloudflare/next-on-pages
npx wrangler pages deploy .vercel/output/static

Once this project is created, you'll need to add your environment variables for CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_KEY in the Cloudflare dash under this project's settings. You'll also need to add the nodejs_compat compatibility flag under this project's settings within the Settings->Functions section in the Cloudflare dash.

Contributing

This project is still in development! Contributions are very much appreciated!

If you would like to contribute to this project, please feel free to open a pull request or an issue, I hashed this project out in a few hours so there are bound to be some bugs!

chatcloudflare's People

Contributors

nashex avatar rickyrobinett avatar marcoworms avatar timweyand avatar

Stargazers

 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.