ChatMock
Connect TomoriBot to a local Chat Completions bridge using ChatMock.
1. Start ChatMock
Section titled “1. Start ChatMock”- Install ChatMock using its repository instructions.
- If your account and access method permit this use, authenticate and start the server:
chatmock loginchatmock serve- Confirm the local API is reachable at
http://127.0.0.1:8000/v1.
2. Configure TomoriBot
Section titled “2. Configure TomoriBot”- Run
/providersor/personal providersand add anOpenAI-Compatiblecustom endpoint. - Enter the connection settings:
| Field | Value |
|---|---|
| Endpoint URL | http://127.0.0.1:8000/v1 when the bot runs on this machine outside production |
| Auth token | The bridge’s client key if authentication is enabled |
- Select the saved endpoint and add a Text Model with the exact API ID ChatMock exposes. Register more IDs under the same connection to switch models.
- A bare
http://127.0.0.1:8000normalizes to/v1; do not append/chat/completions. - Allow
127.0.0.1:8000in TomoriBot’s developmentALLOW_PRIVATE_NETWORKsetting. Docker’s loopback refers to the container. - Enable tools, images, or structured output only after testing the bridge and selected model. Keep video off.
- For a separately hosted production bot, follow Cloudflare Tunnel. Production requires public HTTPS. Direct loopback/port-based ChatMock prompt detection does not apply to the tunnel’s public hostname, so validate system-instruction behavior separately. Account login authorizes ChatMock’s upstream requests; it does not authenticate clients of your public endpoint. Review the tunnel guide’s known risks before sharing.