git clone [email protected]:yenche123/visualized-gpt.git
cd visualized-gpt
# Please make sure you have pnpm installed beforehand
pnpm i
Open Val Town and log in. When logging in, please remember the username you entered on the following page.
After logging in, go to the Secrets Page,and enter your openai_key
as shown below.
The KEY name is openai_key
, and the VALUE can be obtained from OpenAI Api Keys
Open cloud function, tap the Fork
button, and then press Run
, as shown below.
Next, you can tap the 🔒 icon next to the cloud function name (as shown below) to switch the cloud function to public or private. If it is set to private
, you must configure VITE_VAL_TOWN_AUTH
in step 5.
Go back to the project root directory and create a new file named .env.local.
Copy all the text in .env.template
to .env.local
and fill in the corresponding values for each environment variable after =
, as shown below.
# your username in val town
VITE_VAL_TOWN_USERNAME=Your val town username should be filled in here
pnpm run dev
After waiting for vite to process, press the o
key to preview.
pnpm run build
After waiting for vite to process, you can get the ./dist
folder in the project root directory, where the files are the production code for the front-end.
Put the files in ./dist
into your own server, or use a third-party static website hosting service such as Zeabur / Netlify / Cloudflare / Vercel
Congratulations, you are done! 🎉