Skip to content

Latest commit

 

History

History
42 lines (26 loc) · 798 Bytes

README.md

File metadata and controls

42 lines (26 loc) · 798 Bytes

ai-toggle-mode

Demo of Vercel AI SDK to control UI via side effects. Set light/dark/system mode by typing the mode you want, e.g. dark mode, in the chat. Type clear to delete messages from the chat.


ai-toggle-mode.mp4

Prompting an llm to set dark or light theme and clear messages

Quickstart

1. Clone this repository

Run the following command to clone the repo:

https://github.com/DraganAleksic99/ai-toggle-mode.git

2. Install dependencies

cd ai-toggle-mode
npm i

3. Fill out secrets

cp .env.local.example .env.local

4. Run app locally

npm run dev

Open in your browser

You can now visit http://localhost:3000.