Chloe

Reference

@chloejs/core/tools/web

Reading a public web page.

The tools over webService.ts and searchService.ts: reading one public web page, and searching the web.

import * as web from "@chloejs/core/tools/web";
tools: { webReadPage: web.readPage(), webSearch: web.search() }

readPagesearch

readPagefunction

export function readPage()

Makes a tool that lets the model read one public web page as plain text, with links written as [text](url). A long page comes back in parts of about 20,000 characters, and the model asks for the next part.

It reads only public addresses: it refuses this machine, your local network and other private addresses, even through a redirect. It does not run the page's JavaScript, so a page built in the browser comes back nearly empty.

Takes no options and needs no connection.

tools: { webReadPage: web.readPage() }

plugins/web/tools.ts:28