Function: scrapperLinksToRetrievables()
ts
function scrapperLinksToRetrievables(
payload: ScrapperLinksLike,
opts?: ToRetrievableOptions,
): RawRetrievable[];Defined in: batteries/tools/web_retrieval/index.ts:271
Convert a Scrapper normalised links payload into one @nhtio/adk!RawRetrievable per link.
Parameters
| Parameter | Type | Description |
|---|---|---|
payload | ScrapperLinksLike | The Scrapper normalised links payload ({ links: [{ url, text }] }). |
opts | ToRetrievableOptions | Trust tier, kind, id prefix. |
Returns
One RawRetrievable per link.
Remarks
Each link's text becomes the (inline) content and its url the source. Link text is short, so no spooling is applied.