aboutsummaryrefslogtreecommitdiff
path: root/config.def.h
blob: 72b9be64c3e6fda61c6d9da6e58ac1304c80824a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* xmppcb configuration.
 *
 * This file is the template. On first build the makefile copies it to
 * config.h, which is the file you actually edit. config.h is gitignored.
 *
 * Secrets are NOT stored here. Export them in the environment instead:
 *     XMPP_PASSWORD   the bot account password
 *     LLM_API_KEY     the LLM HTTP API key
 */

/* --- XMPP account --------------------------------------------------- */
#define XMPP_HOST  "chat.example.com"        /* host to connect to       */
#define XMPP_PORT  5222                      /* c2s port (STARTTLS)      */
#define XMPP_JID   "aibot@chat.example.com"  /* bot bare JID             */
#define XMPP_NICK  "AIBot"                   /* nickname used in rooms   */

/* MUC rooms to join */
static const char *ROOMS[] = {
	"general@conference.chat.example.com",
	"bot-room@conference.chat.example.com",
};

/* message prefix that triggers the bot */
#define CMD_PREFIX "@bot"

/* --- LLM HTTP API (OpenAI-compatible chat/completions) -------------- */
#define LLM_HOST       "api.openai.com"
#define LLM_PORT       443
#define LLM_PATH       "/v1/chat/completions"
#define LLM_MODEL      "gpt-5.4-mini"
#define LLM_MAX_TOKENS 800
/* For OpenRouter instead:
 *     LLM_HOST  "openrouter.ai"
 *     LLM_PATH  "/api/v1/chat/completions"
 *     LLM_MODEL "anthropic/claude-sonnet-4-6"
 */

/* --- behaviour ------------------------------------------------------ */
#define INSTRUCTION_FILE "instruction.md" /* system prompt, read once at start */
#define HISTORY_DIR      "history"        /* directory for per-room chat logs  */
#define HISTORY_CONTEXT  50               /* messages used when no period given */
#define KEEPALIVE_SEC    60               /* whitespace keepalive interval      */
#define TLS_VERIFY       1                /* 1 = verify server TLS certificate  */
#define CMD_DIR          "cmd"            /* dir of @scriptname command scripts */
#define CMD_TIMEOUT_SEC  10               /* kill a command script after N sec  */