/rw-rsc-ai-jsx

RW RSC demo that integrates with ai-jsx

Primary LanguageTypeScript

Redwood RSC Demo 6

Repo demonstrating the RedwoodJS React Server Components implementation

This app shows using a Server Function as an action to call the OpenAI api using ai-jsx

How to run

No matter whether you chose to use GitPod or to run this locally you'll have to add your OpenAI API Key to .env. The variable name should be OPENAI_API_KEY. Make sure you have credits on your OpenAI account or you won't be able to use their API

GitPod

Open in Gitpod

Locally

yarn install

yarn rw build -v && yarn rw serve

What to do

  1. Look at the imports in App.tsx. RW's RSC implementation is compatible with packages built for NextJS.
  2. Talk to the bot 🤖

List of Redwood RSC demos

  1. https://github.com/Tobbe/rw-rsc-client-counter
  2. https://github.com/Tobbe/rw-rsc-suspense
  3. https://github.com/Tobbe/rw-rsc-server-mutation
  4. https://github.com/Tobbe/rw-rsc-rsf-return-value
  5. https://github.com/Tobbe/rw-rsc-form-server-action
  6. https://github.com/Tobbe/rw-rsc-ai-jsx