From 72602f7c8c0bc28af2a38600b1fd8485730eb370 Mon Sep 17 00:00:00 2001 From: Jeremy Schlatter Date: Mon, 12 Jan 2026 15:29:46 -0800 Subject: [PATCH] Fix documentation: config fields use snake_case The docs showed camelCase examples for config fields, but the config system expects snake_case. This commit updates the docs to use snake_case instead. Also changes `innerName` to `name` in one location in architecture.md to match the corresponding BotConfig field in src/types.ts. --- README.md | 54 ++++++++++++++++++++++---------------------- architecture.md | 57 ++++++++++++++++++++++++----------------------- package-lock.json | 12 ---------- 3 files changed, 56 insertions(+), 67 deletions(-) diff --git a/README.md b/README.md index f5e840d..c6707a7 100644 --- a/README.md +++ b/README.md @@ -63,19 +63,19 @@ Create `config/bots/your-bot-name.yaml`: name: Claude # Name used in LLM context mode: prefill -continuationModel: claude-3-5-sonnet-20241022 +continuation_model: claude-3-5-sonnet-20241022 temperature: 1.0 -maxTokens: 4096 +max_tokens: 4096 -recencyWindowMessages: 400 # Optional: max messages -recencyWindowCharacters: 100000 # Optional: max characters -rollingThreshold: 50 +recency_window_messages: 400 # Optional: max messages +recency_window_characters: 100000 # Optional: max characters +rolling_threshold: 50 -includeImages: true -maxImages: 5 +include_images: true +max_images: 5 -toolsEnabled: true -toolOutputVisible: false +tools_enabled: true +tool_output_visible: false ``` ### 4. Configure Vendor @@ -149,35 +149,35 @@ name: BotName # Name used in LLM context (prefill labels, stop sequences) # Model mode: prefill # or 'chat' -continuationModel: claude-3-5-sonnet-20241022 +continuation_model: claude-3-5-sonnet-20241022 temperature: 1.0 -maxTokens: 4096 -topP: 1.0 +max_tokens: 4096 +top_p: 1.0 # Context -recencyWindowMessages: 400 # Optional: max messages -recencyWindowCharacters: 100000 # Optional: max characters +recency_window_messages: 400 # Optional: max messages +recency_window_characters: 100000 # Optional: max characters # When both specified, whichever limit is reached first is used -rollingThreshold: 50 +rolling_threshold: 50 # Images -includeImages: true -maxImages: 5 +include_images: true +max_images: 5 # Tools -toolsEnabled: true -toolOutputVisible: false -maxToolDepth: 100 +tools_enabled: true +tool_output_visible: false +max_tool_depth: 100 # Retry -llmRetries: 3 -discordBackoffMax: 32000 +llm_retries: 3 +discord_backoff_max: 32000 # Misc -systemPrompt: "Optional system prompt" -replyOnRandom: 0 -replyOnName: false -maxQueuedReplies: 1 +system_prompt: "Optional system prompt" +reply_on_random: 0 +reply_on_name: false +max_queued_replies: 1 ``` ### Discord Commands @@ -195,7 +195,7 @@ last: https://discord.com/channels/.../message_id .config botname --- temperature: 0.7 -maxTokens: 2000 +max_tokens: 2000 ``` **M Commands**: diff --git a/architecture.md b/architecture.md index 6766d6f..cac81a6 100644 --- a/architecture.md +++ b/architecture.md @@ -320,39 +320,40 @@ class ConfigSystem { } interface BotConfig { - innerName: string // Name used in LLM context + name: string // Name used in LLM context // Model config mode: 'prefill' | 'chat' - continuationModel: string + continuation_model: string temperature: number - maxTokens: number - topP: number + max_tokens: number + top_p: number // Context config - recencyWindow: number // Max messages or chars - rollingThreshold: number // Messages before truncation + recency_window_messages: number // Max messages + recency_window_characters: number // Max characters + rolling_threshold: number // Messages before truncation // Image config - includeImages: boolean - maxImages: number + include_images: boolean + max_images: number // Tool config - toolsEnabled: boolean - toolOutputVisible: boolean - maxToolDepth: number + tools_enabled: boolean + tool_output_visible: boolean + max_tool_depth: number // Stop sequences - stopSequences: string[] + stop_sequences: string[] // Retries - llmRetries: number - discordBackoffMax: number + llm_retries: number + discord_backoff_max: number // Misc - replyOnRandom: number - replyOnName: boolean - maxQueuedReplies: number + reply_on_random: number + reply_on_name: boolean + max_queued_replies: number } ``` @@ -1162,22 +1163,22 @@ See `config_examples.md` for detailed configuration examples. name: Claude # Name used in LLM context mode: prefill -continuationModel: claude-3-5-sonnet-20241022 +continuation_model: claude-3-5-sonnet-20241022 temperature: 1.0 -maxTokens: 4096 +max_tokens: 4096 -recencyWindow: 400 -rollingThreshold: 50 +recency_window_messages: 400 +rolling_threshold: 50 -includeImages: true -maxImages: 5 +include_images: true +max_images: 5 -toolsEnabled: true -toolOutputVisible: false -maxToolDepth: 100 +tools_enabled: true +tool_output_visible: false +max_tool_depth: 100 -llmRetries: 3 -discordBackoffMax: 32000 +llm_retries: 3 +discord_backoff_max: 32000 ``` ### Vendor Config diff --git a/package-lock.json b/package-lock.json index cac7d22..1b3ed51 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,6 @@ }, "devDependencies": { "@types/node": "^22.10.1", - "@types/sharp": "^0.32.0", "@typescript-eslint/eslint-plugin": "^8.18.0", "@typescript-eslint/parser": "^8.18.0", "eslint": "^9.16.0", @@ -3205,17 +3204,6 @@ "@types/node": "*" } }, - "node_modules/@types/sharp": { - "version": "0.32.0", - "resolved": "https://registry.npmjs.org/@types/sharp/-/sharp-0.32.0.tgz", - "integrity": "sha512-OOi3kL+FZDnPhVzsfD37J88FNeZh6gQsGcLc95NbeURRGvmSjeXiDcyWzF2o3yh/gQAUn2uhh/e+CPCa5nwAxw==", - "deprecated": "This is a stub types definition. sharp provides its own type definitions, so you do not need this installed.", - "dev": true, - "license": "MIT", - "dependencies": { - "sharp": "*" - } - }, "node_modules/@types/ws": { "version": "8.18.1", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz",