Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
tgfake
command
Command tgfake serves the tgfake server - a fake Telegram Bot API with a chat page and a simulation API - and optionally a scripted OpenAI-compatible model, so a bot runs with no token, no phone and no network.
|
Command tgfake serves the tgfake server - a fake Telegram Bot API with a chat page and a simulation API - and optionally a scripted OpenAI-compatible model, so a bot runs with no token, no phone and no network. |
|
examples
|
|
|
echobot
command
Command echobot is the smallest bot worth testing against tgfake, written with the standard library alone so nothing hides what goes over the wire.
|
Command echobot is the smallest bot worth testing against tgfake, written with the standard library alone so nothing hides what goes over the wire. |
|
internal
|
|
|
chatpage
Package chatpage is the chat page of the tgfake server: the person's side of the conversation in a browser, with the bot's keyboards as buttons, a phone frame for Mini Apps and the Bot API calls alongside.
|
Package chatpage is the chat page of the tgfake server: the person's side of the conversation in a browser, with the bot's keyboards as buttons, a phone frame for Mini Apps and the Bot API calls alongside. |
|
pkg
|
|
|
botapi
Package botapi holds the wire shapes of the Telegram Bot API objects the tgfake server sends and reads.
|
Package botapi holds the wire shapes of the Telegram Bot API objects the tgfake server sends and reads. |
|
llmstub
Package llmstub is a scripted model server in the shape of the OpenAI Chat Completions API: GET /v1/models and POST /v1/chat/completions, with and without streaming.
|
Package llmstub is a scripted model server in the shape of the OpenAI Chat Completions API: GET /v1/models and POST /v1/chat/completions, with and without streaming. |
|
server
Package server is the tgfake server, a stand-in for the Telegram Bot API: an HTTP server that answers the methods a bot calls, keeps the chats it is sent, and hands out the updates an operator or a test injects.
|
Package server is the tgfake server, a stand-in for the Telegram Bot API: an HTTP server that answers the methods a bot calls, keeps the chats it is sent, and hands out the updates an operator or a test injects. |
|
serverless
Package serverless runs local Telegram Serverless projects against a Bot API origin.
|
Package serverless runs local Telegram Serverless projects against a Bot API origin. |
|
webapp
Package webapp is what Telegram does around a Mini App launch, with no state of its own: the launch data signed with the bot's token and checked the way an app checks it (core.telegram.org/bots/webapps, "Validating data received via the Mini App"), the launch parameters put into the app's address, the colours of a Telegram theme and the rule for which addresses a web_app button may open.
|
Package webapp is what Telegram does around a Mini App launch, with no state of its own: the launch data signed with the bot's token and checked the way an app checks it (core.telegram.org/bots/webapps, "Validating data received via the Mini App"), the launch parameters put into the app's address, the colours of a Telegram theme and the rule for which addresses a web_app button may open. |
Click to show internal directories.
Click to hide internal directories.
