docs: document ANTHROPIC_API_KEY + GPT/Claude backend switch

Update the two deployment guides to cover the new env vars and the runtime
switch: ANTHROPIC_API_KEY / netrc machine 'anthropic', CONJURER_AI_CONFIG
(gpt|claude), the $gadaj_teraz command, and the note that DALL-E + personal
assistants stay on OpenAI regardless of the switch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Michal Tuszowski
2026-07-10 23:39:21 +02:00
parent 3d9d47aa90
commit 9f0191fba2
2 changed files with 45 additions and 1 deletions
+27
View File
@@ -85,6 +85,33 @@ sudo chmod 600 /srv/conjurer/secrets/.netrc
(Alternatively skip netrc and set `DISCORD_TOKEN` / `OPENAI_API_KEY` in the env
file — those take precedence.)
For the **Claude backend** add an `anthropic` machine to the same netrc (or set
`ANTHROPIC_API_KEY` in `bot.env`):
```
machine anthropic
password sk-ant-...
```
You only need this if you actually switch the bot to Claude — see 1c-bis.
### 1c-bis. AI backend switch (GPT ↔ Claude)
The bot's AI chat runs on one backend at a time, chosen by a single switch:
- **At startup**, set `CONJURER_AI_CONFIG` in `bot.env``gpt` (default) or
`claude`. Leave it unset to use the `"active"` key in
`system_gpt_settings.json` (falls back to `gpt`).
- **At runtime**, `$gadaj_teraz <config>` (Vykidailo only) flips the backend live
and writes the choice back into `system_gpt_settings.json`.
The provider configs (which backend, which models) are collected in
`system_gpt_settings.json` under the third list element — add further AIs there.
`claude` needs `ANTHROPIC_API_KEY`; `gpt` needs `OPENAI_API_KEY`. Image
generation (`imaginuje sobie:`) and personal assistants stay on OpenAI whatever
the switch says (Anthropic has no equivalent) and degrade quietly if OpenAI is
not configured, so a Claude-only box still boots.
### 1d. Configure and launch
```bash