FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
cricks_unmixed4u
cricks_unmixed4uclient-generator
Remix of cricks_unmixed4u/ai-prompted
Public
Like
client-generator
Home
Code
9
.cursor
1
backend
2
frontend
3
.cursorrules
.vtignore
README.md
deno.json
knowledge.md
H
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
1
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.
Sign up now
Code
/
README.md
Code
/
README.md
Search
…
Viewing readonly version of main branch: v19
View latest version
README.md@19

GPT Wrapper Interface

A Val Town project that provides a web interface for interacting with the GreenPT API through a statically imported GPT wrapper.

Project Structure

├── 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

Features

  • 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

Usage

  1. Open the web interface
  2. Select a model (currently supports green-l)
  3. Enter your message
  4. Click "Send Message" or use Ctrl+Enter
  5. View the AI response

API Endpoints

  • GET / - Main web interface
  • GET /gpt - API information
  • POST /gpt - Send messages to GPT model

POST /gpt Request Format

{ "model": "green-l", "messages": [ { "role": "user", "content": "Your message here" } ] }

Implementation Notes

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
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.