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
@@ -238,7 +238,6 @@ async function ensureExampleClaimJsonlLoaded(): Promise<void> {
if (jsonlLoaded) return;
logger.info("Initializing JSONL ranking...");
//TODO: make jsonl parsins
const stream = fs.createReadStream(JSONL_PATH);
const rl = readline.createInterface({
+5 -6
View File
@@ -27,16 +27,15 @@ const webSearch = tool(
);
const openWebpage = tool(
async ({ a, b }) => {
async ({ a }) => {
const data = await extractWebpageContent(a);
return rankAndDisplayData(data, b);
return data;
},
{
name: "OpenWebpage",
description: "Opens webpage and returns most relevent snippets",
name: "WebRetreiveUrl",
description: "Fetches and reads the FULL contents of a webpage. REQUIRED when detailed or accurate information is needed.",
schema: z.object({
a: z.string().describe("URL"),
b: z.string().describe("What to match against in webpage content"),
a: z.url().describe("URL")
}),
}
);
-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"))