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 miliseconds.
Viewing readonly version of main branch: v19View latest version
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