This is a small Chinese-language self-hosted project that lets a real person sit on the other side of an OpenAI-style chat API. Other software thinks it is talking to an AI assistant, but the requests actually land in a web console where the operator types the replies by hand. The author also suggests using it as a mock language model for testing your own agent code without paying for a real model. The system has three parts: a Flask backend in Python, a React frontend built with Vite and Ant Design, and a SQLite file that stores users, sessions, and message history. Login uses a username and password set in a .env file, with optional TOTP for two-factor authentication. The same backend exposes three popular request shapes so most clients can connect without changes: /v1/chat/completions, /v1/responses, and Anthropic's /messages. Beyond manual replies, the web console can set automated behaviour. The operator can schedule streamed responses, send looping output, and configure conditional auto-replies that trigger on patterns in the incoming message. There is also optional ntfy push notification so the operator can hear about new chats on a phone. Deployment can go either through Nginx or be run directly from Flask. The frontend is built with npm install and npm run build, then served either by Nginx as static files or by Flask itself when the CHATAPI_WEB_DIST_DIR variable points at the dist folder. The backend is started with the uv tool: uv sync followed by uv run main.py. Common environment variables cover the listening host and port, the SQLite path, allowed CORS origins, optional TLS certificate files, and several optional email-sender configurations such as SMTP, Resend, Brevo, and Tencent Cloud SES. After login, the operator can manage the API key, the site title, the ntfy address, message rate limits, and TOTP inside a system-settings page rather than the .env file. The README shows a curl example that sends a streamed user message to /v1/responses against a model name written in Chinese, which is the project's character persona.
Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.