PTGF
A gpt-like gaming agent that allows users to describe code requirements in natural language and receive generated code responses with syntax highlighting and download options.
Features
- Chat interface for code generation prompts
- Syntax-highlighted code blocks in responses
- Download buttons for generated code files
- Connects to local LLM at http://127.0.0.1:1234 (OpenAI-compatible API)
Setup
Install dependencies:
npm installStart the development server:
npm run devOpen http://localhost:5173 in your browser
Usage
- Ensure your local model is running on http://127.0.0.1:1234
- Enter natural language descriptions of the code you want to generate
- Receive responses with formatted code blocks
- Download generated code using the buttons on each code block
API Requirements
The local model should support the OpenAI chat completions endpoint:
- POST /v1/chat/completions
- Request: { "model": "local-model", "messages": [{ "role": "user", "content": "prompt" }] }
- Response: { "choices": [{ "message": { "content": "response text" } }] }
Build
npm run build
Tech Stack
- React 18
- Vite
- Tailwind CSS
- Axios
- React Syntax Highlighter
Log in or sign up for Devpost to join the conversation.