Files
go-telegram-bot/config/default.json
T
HugeFrog24 401b263991 Upgrade dependencies and toolchain; migrate to Claude API 2026-10-21
Toolchain and CI:
- Go 1.27 (go directive 1.27.0, CI 1.27.3)
- actions/checkout v7, actions/setup-go v7
- golangci-lint v2.15.0, gosec v2.30.0
- Dockerfile: drop obsolete -a -installsuffix cgo build flags

Go modules:
- anthropic-sdk-go v1.71.0 -> v2.3.0 (new /v2 module path, API version
  2026-10-21); go-telegram/bot v1.27.0; x/sync v0.24.0; indirects to latest
- BetaMessageParam is now a per-role union: build assistant turns with
  OfAssistant and read content through the role in the cache helper
- Pass the Anthropic API key only when set: v2 sends an explicitly passed
  credential as is, so an empty key became an empty bearer token instead of
  falling back to the SDK's default credential chain as v1 did

API 2026-10-21 / deprecations:
- Stop sending temperature (rejected on every model); the config key is
  still parsed and a startup notice flags it
- Name refusals in the empty-response error instead of reporting an
  unexpected response format
- ElevenLabs STT: scribe_v1 (deprecated) -> scribe_v2
- Template config: claude-haiku-5-5 with effort low, temperature removed

Docs: replace the unsupported `go get -u` install step, document the ignored
temperature key, default-on thinking, and per-model effort defaults.
2026-10-25 13:34:39 +01:00

24 lines
1.6 KiB
JSON

{
"id": "default_bot",
"active": false,
"telegram_token": "YOUR_TELEGRAM_BOT_TOKEN",
"owner_telegram_id": 111111111,
"anthropic_api_key": "YOUR_SPECIFIC_ANTHROPIC_API_KEY",
"elevenlabs_api_key": "",
"elevenlabs_voice_id": "",
"elevenlabs_model": "",
"memory_size": 10,
"messages_per_hour": 20,
"messages_per_day": 100,
"temp_ban_duration": "24h",
"model": "claude-haiku-5-5",
"max_tokens": 1000,
"effort": "low",
"debounce_ms": 2500,
"debug_screening": false,
"system_prompts": {
"custom_instructions": "You are Atom, a helpful assistant texting through a limited Telegram interface with a 15-word maximum. Write like texting a friend - use shorthand, skip grammar, use slang/abbreviations. The system cuts off anything longer than 15 words.\n\n- Address the user by their first name, and reply in their preferred language (both are in the conversation context).\n- Use time-appropriate greetings based on the user's local time of day.\n- If a user asks about buying apples, inform them that we don't sell apples.\n- When asked for a joke, tell a clean, family-friendly joke about programming or technology.\n- If someone inquires about our services, explain that we offer AI-powered chatbot solutions.\n- For any questions about pricing, direct users to contact our sales team at [email protected].\n- If asked about your capabilities, be honest about what you can and cannot do.\nAlways maintain a friendly and professional tone.",
"respond_with_emojis": "The user's message contains only emoji. Reply using only emoji."
}
}