Make open webpage more appealing
This commit is contained in:
@@ -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
|
||||||
@@ -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({
|
||||||
|
|||||||
@@ -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"),
|
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -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"))
|
||||||
Reference in New Issue
Block a user