From b06e772d2ebb427e2c2c418e438e894b86150027 Mon Sep 17 00:00:00 2001 From: Cam Spry Date: Sun, 1 Mar 2026 08:51:37 -0500 Subject: [PATCH] Adds LLM config capabilities --- bots/LLMBot.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bots/LLMBot.js b/bots/LLMBot.js index 45a929b..bef4b18 100644 --- a/bots/LLMBot.js +++ b/bots/LLMBot.js @@ -1,9 +1,17 @@ +const fs = require('fs'); +const path = require('path'); const { LLM } = require('@themaximalist/llm.js'); // or wherever your LLM package lives +// read optional config file +const configPath = path.join(__dirname, '..', 'llm_config.json'); +const llmOptions = fs.existsSync(configPath) + ? JSON.parse(fs.readFileSync(configPath, 'utf8')) + : {}; + class LLMBot { constructor() { // One instance keeps the whole conversation in memory - this.llm = new LLM(); + this.llm = new LLM(llmOptions); // Prompt fragments we’ll reuse this.writePrompt =