implement verification model

This commit is contained in:
William Jeynes
2026-02-12 22:32:24 +00:00
parent bef856d53a
commit 6dd6bf7eaf
7 changed files with 40 additions and 11 deletions
+13 -1
View File
@@ -1,6 +1,8 @@
import fs from "fs";
import { queryScraper } from "../tools/webSearch";
import { rankAndDisplayData } from "../tools/triggerEventTools";
export function hydratePrompt(path: string, state: any) {
export async function hydratePrompt(path: string, state: any) : Promise<string> {
// TODO: expand into full context-based replacement engine
let raw = fs.readFileSync("prompts/" + path, "utf-8");
@@ -8,5 +10,15 @@ export function hydratePrompt(path: string, state: any) {
raw = raw.replace("###TITLE###", state.disinformationTitle);
raw = raw.replace("###LM###", state.messages.at(-1).content);
if (raw.indexOf("###TECLAIM###") != -1) {
const title = state.proposedTriggerEvent[state.proposedTriggerEventIndex].Event
raw = raw.replace("###TECLAIM###", title)
}
if (raw.indexOf("###TESEARCH###") != -1) {
const output = state.proposedTriggerEvent[state.proposedTriggerEventIndex].context
raw = raw.replace("###TESEARCH###", output)
}
return raw;
}