add intelligence and SQL tabs to admin interface with corresponding API endpoints
This commit is contained in:
parent
18d062fd2d
commit
eaeffd003a
1 changed files with 3 additions and 3 deletions
|
|
@ -125,7 +125,7 @@ async function runAugorWorker(archiveDb, intelligenceDb, config) {
|
|||
}
|
||||
}
|
||||
|
||||
setStatusByEventArticles.run(eventId);
|
||||
for (const r of getEventArticleIds.all(eventId)) setStatusByArticleId.run(r.id);
|
||||
console.log(`[augor] processed event ${eventId} (${matchedCompanies.length} companies, ${eventArticles.length} articles)`);
|
||||
|
||||
} catch (err) {
|
||||
|
|
@ -168,7 +168,6 @@ async function callLlm(llmConfig, prompt) {
|
|||
model: llmConfig.model || "gpt-4o-mini",
|
||||
messages: [{ role: "user", content: prompt }],
|
||||
temperature: 0.1,
|
||||
response_format: { type: "json_object" },
|
||||
});
|
||||
|
||||
const baseUrl = llmConfig.baseUrl || "https://api.openai.com";
|
||||
|
|
@ -183,7 +182,8 @@ async function callLlm(llmConfig, prompt) {
|
|||
const content = parsed.choices?.[0]?.message?.content;
|
||||
if (!content) return null;
|
||||
|
||||
return JSON.parse(content);
|
||||
const stripped = content.replace(/^```(?:json)?\s*/i, '').replace(/\s*```$/, '').trim();
|
||||
return JSON.parse(stripped);
|
||||
}
|
||||
|
||||
function httpPost(url, body, headers) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue