Skip to main content

Image Generation

Control the behavior of the /image command and manage usage limits. For a complete guide, see multimedia generation.
VariableDescriptionDefault
IMAGE_GENERATIONS_LIMITA monthly limit on the number of images a user can generate. Set to 0 for unlimited. This helps manage API costs.0
IMAGE_GENERATIONS_WHITELISTA comma-separated list of users (usernames or IDs) who are exempt from the image generation limit.None
IMAGE_N_CHOICESThe number of image variations to generate per request.1
IMAGE_QUALITYThe quality of the generated image. Options like standard or hd can affect cost and detail.standard
IMAGE_SIZEThe default dimensions for the generated image (e.g., 1024x1024).1024x1024
IMAGE_ASPECT_RATIOThe default aspect ratio (e.g., 16:9, 1:1). This provides a more intuitive way to control image shape than specific dimensions.16:9

Context & Sampling

Fine-tune the AI’s responses by controlling context length and sampling parameters. These settings directly impact the creativity, coherence, and cost of the model’s output.
VariableDescriptionDefault
MAX_HISTORY_TOKENSThe maximum number of tokens from the conversation history to send with each new request. A lower value saves costs but may cause the bot to “forget” earlier parts of the conversation.64000
MAX_TOKENSThe maximum number of tokens the model is allowed to generate in its response. Prevents overly long or expensive replies.32000
TEMPERATUREControls the randomness of the output. A value closer to 0.0 makes the model more deterministic and focused, while a value closer to 2.0 makes it more creative and unpredictable.1.0
FREQUENCY_PENALTYA value that penalizes new tokens based on their existing frequency in the text so far, discouraging the model from repeating the same lines verbatim.0.0
PRESENCE_PENALTYA value that penalizes new tokens based on whether they appear in the text so far, encouraging the model to introduce new topics.0.0
MAX_CONVERSATION_AGE_MINUTESThe maximum time in minutes that a conversation context is considered “active.” Older conversations will be pruned to manage memory.360

Model Context Protocol (MCP)

MCP allows Chibi to integrate with external tools and services, giving it powerful new capabilities. Learn more about Agent Mode and MCP integration.
VariableDescriptionDefault
ENABLE_MCP_SSESet to True to enable the Server-Sent Events (SSE) based MCP, allowing for real-time, asynchronous tool communication.True
ENABLE_MCP_STDIOSet to True to enable the Standard I/O (stdio) based MCP, for integrating with local command-line tools.False

Heartbeat (Health Monitoring)

Configure a “heartbeat” to send periodic pings to an external monitoring service. This is a simple way to verify that your bot is alive and running.
VariableDescriptionDefault
HEARTBEAT_URLThe endpoint URL of your monitoring service (e.g., Healthchecks.io, Uptime Kuma).None
HEARTBEAT_FREQUENCY_CALLThe interval in seconds between each heartbeat ping.30
HEARTBEAT_RETRY_CALLSThe number of times to retry a failed ping before considering the connection lost.3
HEARTBEAT_PROXYA proxy to use for sending heartbeat requests.None

Next Steps