Skip to content
1 min read · 120 words

Function: scrapperArticleToRetrievable()

ts
function scrapperArticleToRetrievable(
  article: ScrapperArticleLike,
  opts?: ArticleToRetrievableOptions,
  recommend?: ArtifactRecommendations,
): RawRetrievable;

Defined in: batteries/tools/web_retrieval/index.ts:217

Convert a Scrapper normalised article into a single @nhtio/adk!RawRetrievable.

Parameters

ParameterTypeDescription
articleScrapperArticleLikeThe Scrapper normalised article.
optsArticleToRetrievableOptionsTrust tier, kind, id prefix, content source, markdown flag, optional spool hook.
recommendArtifactRecommendationsOptional artifact-resolver recommendations.

Returns

RawRetrievable

A single RawRetrievable.

Remarks

Long article text is exactly what a reader-backed @nhtio/adk!SpooledArtifact is for: pass a spool hook and the converter offers it the recommended artifact resolver (markdown when asMarkdown, else text/HTML) so the model gets the right forged query tools. Without a hook, content stays inline.