update augorWorker to use openRouter configuration and set llmModel in config

This commit is contained in:
ImBenji
2026-04-22 21:15:35 +01:00
parent 0fbdc21861
commit 17107047fe
2 changed files with 5 additions and 10 deletions
+3 -4
View File
@@ -5,7 +5,7 @@ const { findMatchedCompaniesByEmbedding } = require("./embeddings");
async function runAugorWorker(archiveDb, intelligenceDb, config) {
const loopDelay = config.workers?.augorLoopDelayMs ?? 1500;
const llmConfig = config.llm || {};
const llmConfig = config.openRouter || {};
const getPending = intelligenceDb.prepare(`
SELECT * FROM article_queue WHERE status = 'pending' LIMIT 1
@@ -165,13 +165,12 @@ Only include claims directly supported by the articles. Use empty arrays if noth
async function callLlm(llmConfig, prompt) {
const body = JSON.stringify({
model: llmConfig.model || "gpt-4o-mini",
model: llmConfig.llmModel || llmConfig.model,
messages: [{ role: "user", content: prompt }],
temperature: 0.1,
});
const baseUrl = llmConfig.baseUrl || "https://api.openai.com";
const url = new URL("/v1/chat/completions", baseUrl);
const url = new URL("https://openrouter.ai/api/v1/chat/completions");
const responseText = await httpPost(url, body, {
"Content-Type": "application/json",