diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-05-21 13:07:08 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-05-21 13:28:51 +0200 |
| commit | fb0fd67d6e7e55548c7a0a1ec67f608efffe3a94 (patch) | |
| tree | e712f9a3f6b85402a9e2900dd00d2cec05fb6b14 /config.def.h | |
| download | xmppcb-fb0fd67d6e7e55548c7a0a1ec67f608efffe3a94.tar.gz xmppcb-fb0fd67d6e7e55548c7a0a1ec67f608efffe3a94.zip | |
initial commit
Diffstat (limited to 'config.def.h')
| -rw-r--r-- | config.def.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h new file mode 100644 index 0000000..759a941 --- /dev/null +++ b/config.def.h @@ -0,0 +1,43 @@ +/* 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 */ |
