Adds LLM config capabilities

This commit is contained in:
Cam Spry 2026-03-01 08:51:37 -05:00
parent 499a5954f5
commit b06e772d2e
1 changed files with 9 additions and 1 deletions

View File

@ -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 well reuse
this.writePrompt =