Make open webpage more appealing

This commit is contained in:
William Jeynes
2026-02-19 10:07:39 +00:00
parent b70b75bf28
commit 6f20ade780
4 changed files with 5 additions and 10 deletions
-1
View File
@@ -22,6 +22,5 @@ Use your abilities to look between the lines and produce some insightful analysi
Events will be reordered as part of processing, each statement must stand alone Events will be reordered as part of processing, each statement must stand alone
The preceeding messages act as examples of previous responses to potentially ficitonal events and scores given. The preceeding messages act as examples of previous responses to potentially ficitonal events and scores given.
Analysis should only be completed for proposed events that would graner >0.7 points
Lets go through it step by step Lets go through it step by step
-1
View File
@@ -238,7 +238,6 @@ async function ensureExampleClaimJsonlLoaded(): Promise<void> {
if (jsonlLoaded) return; if (jsonlLoaded) return;
logger.info("Initializing JSONL ranking..."); logger.info("Initializing JSONL ranking...");
//TODO: make jsonl parsins
const stream = fs.createReadStream(JSONL_PATH); const stream = fs.createReadStream(JSONL_PATH);
const rl = readline.createInterface({ const rl = readline.createInterface({
+5 -6
View File
@@ -27,16 +27,15 @@ const webSearch = tool(
); );
const openWebpage = tool( const openWebpage = tool(
async ({ a, b }) => { async ({ a }) => {
const data = await extractWebpageContent(a); const data = await extractWebpageContent(a);
return rankAndDisplayData(data, b); return data;
}, },
{ {
name: "OpenWebpage", name: "WebRetreiveUrl",
description: "Opens webpage and returns most relevent snippets", description: "Fetches and reads the FULL contents of a webpage. REQUIRED when detailed or accurate information is needed.",
schema: z.object({ schema: z.object({
a: z.string().describe("URL"), a: z.url().describe("URL")
b: z.string().describe("What to match against in webpage content"),
}), }),
} }
); );
-2
View File
@@ -29,6 +29,4 @@ export async function extractWebpageContent(url: string) : Promise<string[]>{
} }
} }
//TODO: Extract, rank snippets
//console.log(await extractWebpageContent("https://www.bbc.co.uk/news/live/c74wd01egvyt")) //console.log(await extractWebpageContent("https://www.bbc.co.uk/news/live/c74wd01egvyt"))