refactor: load environment variables from .env file and update openRouter configuration

This commit is contained in:
ImBenji
2026-04-27 18:02:20 +01:00
parent 7ceaaf2401
commit 82abe0bcb3
2 changed files with 166 additions and 17 deletions
+10 -1
View File
@@ -153,10 +153,19 @@ async function processCompany(company, intelligenceDb, llmConfig, getKnowledge,
}
function normalizeEntityName(name) {
return name
.toLowerCase()
.replace(/\./g, "")
.replace(/\s+/g, " ")
.trim();
}
function extractClaimText(type, data) {
if (type === "relationship") {
if (!data.entity) return null;
return `${data.entity} is a ${data.type || "partner"}`;
return `${normalizeEntityName(data.entity)} is a ${data.type || "partner"}`;
}
if (type === "theme") {