totem-llm 0.10.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -162,7 +162,7 @@ async function getPageContent({ link, captureAs = "text", headers = {} }) {
162
162
  launchOptions: {
163
163
  headless: launchConfig.headless,
164
164
  ignoreHTTPSErrors: true,
165
- args: runtimeSettings.get("browserLaunchArgs"),
165
+ args: runtimeSettings.getBrowserLaunchArgs(),
166
166
  },
167
167
  gotoOptions: {
168
168
  waitUntil: "networkidle2",
@@ -72,7 +72,7 @@ async function getPageLinks(url, baseUrl) {
72
72
  launchOptions: {
73
73
  headless: launchConfig.headless,
74
74
  ignoreHTTPSErrors: true,
75
- args: runtimeSettings.get("browserLaunchArgs"),
75
+ args: runtimeSettings.getBrowserLaunchArgs(),
76
76
  },
77
77
  gotoOptions: { waitUntil: "networkidle2" },
78
78
  });
@@ -138,7 +138,7 @@ async function bulkScrapePages(links, outFolderPath) {
138
138
  launchOptions: {
139
139
  headless: launchConfig.headless,
140
140
  ignoreHTTPSErrors: true,
141
- args: runtimeSettings.get("browserLaunchArgs"),
141
+ args: runtimeSettings.getBrowserLaunchArgs(),
142
142
  },
143
143
  gotoOptions: { waitUntil: "networkidle2" },
144
144
  async evaluate(page, browser) {
@@ -35,9 +35,15 @@ class RuntimeSettings {
35
35
  default: [],
36
36
  validate: (value) => {
37
37
  let args = [];
38
- if (Array.isArray(value)) args = value.map((arg) => String(arg.trim()));
39
- if (typeof value === "string")
40
- args = value.split(",").map((arg) => arg.trim());
38
+ if (Array.isArray(value)) {
39
+ args = value.map((arg) => String(arg).trim()).filter(Boolean);
40
+ }
41
+ if (typeof value === "string") {
42
+ args = value
43
+ .split(",")
44
+ .map((arg) => arg.trim())
45
+ .filter(Boolean);
46
+ }
41
47
  return args;
42
48
  },
43
49
  },
@@ -79,6 +85,19 @@ class RuntimeSettings {
79
85
  : this.settingConfigs[key].default;
80
86
  }
81
87
 
88
+ /**
89
+ * Returns browser launch args, with Linux sandbox fallback when none are provided.
90
+ * @returns {string[]}
91
+ */
92
+ getBrowserLaunchArgs() {
93
+ const args = this.get("browserLaunchArgs");
94
+ if (Array.isArray(args) && args.length > 0) return args;
95
+ if (process.platform === "linux") {
96
+ return ["--no-sandbox", "--disable-setuid-sandbox"];
97
+ }
98
+ return [];
99
+ }
100
+
82
101
  /**
83
102
  * Set a runtime setting
84
103
  * - Will throw an error if the setting requested is not a supported runtime setting key
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "totem-llm",
3
- "version": "0.10.0",
3
+ "version": "0.11.1",
4
4
  "description": "Totem LLM – Your Private AI. Run a self-hosted AI assistant locally on Linux, macOS, or Windows.",
5
5
  "main": "bin/totem-llm.js",
6
6
  "type": "module",
@@ -64,7 +64,6 @@
64
64
  "@babel/core": "^8.0.1",
65
65
  "@babel/preset-env": "^8.0.2",
66
66
  "@langchain/textsplitters": "^1.0.1",
67
- "@prisma/client": "^7.8.0",
68
67
  "babel-jest": "^30.4.1",
69
68
  "concurrently": "^9.1.2",
70
69
  "dotenv": "^17.4.2",
@@ -80,3 +79,4 @@
80
79
  "qrcode-terminal": "^0.12.0"
81
80
  }
82
81
  }
82
+
@@ -857,6 +857,7 @@ const SystemSettings = {
857
857
  OllamaLLMModelPref: process.env.OLLAMA_MODEL_PREF,
858
858
  OllamaLLMTokenLimit: process.env.OLLAMA_MODEL_TOKEN_LIMIT || null,
859
859
  OllamaLLMKeepAliveSeconds: process.env.OLLAMA_KEEP_ALIVE_TIMEOUT ?? 300,
860
+ OllamaLLMThinkLevel: process.env.OLLAMA_THINK_LEVEL || "",
860
861
 
861
862
  // Novita LLM Keys
862
863
  NovitaLLMApiKey: !!process.env.NOVITA_LLM_API_KEY,