client-generator
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in milliseconds.
https://cricks_unmixed4u--416d21806c9d4951b87f00a5b42cb8a5.web.val.run
A Val Town project that provides a web interface for interacting with the GreenPT API through a statically imported GPT wrapper.
βββ backend/
β βββ routes/
β β βββ serveGptWrapper.tsx # HTTP trigger for serving the imported GPT wrapper
β βββ index.ts # Main entry point for backend services
βββ frontend/
β βββ index.html # Main HTML template
β βββ index.tsx # Frontend JS entry point
βββ README.md
- Web interface for sending messages to GPT models
- Static import of Val Town GPT wrapper module
- Clean, responsive UI with TailwindCSS
- Error handling and loading states
- Support for different GPT models
- Open the web interface
- Select a model (currently supports green-l)
- Enter your message
- Click "Send Message" or use Ctrl+Enter
- View the AI response
GET /- Main web interfaceGET /gpt- API informationPOST /gpt- Send messages to GPT model
{ "model": "green-l", "messages": [ { "role": "user", "content": "Your message here" } ] }
This project demonstrates:
- Static importing of external Val Town modules
- Hono framework for API routing
- Val Town utility functions for file serving
- Clean separation of frontend and backend code