Skip to content
1 min read · 119 words

Function: searxngResultsToRetrievables()

ts
function searxngResultsToRetrievables(
  payload: SearxngPayloadLike,
  opts?: ToRetrievableOptions,
  recommend?: ArtifactRecommendations,
): RawRetrievable[];

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

Convert a SearXNG normalised payload into one @nhtio/adk!RawRetrievable per result.

Parameters

ParameterTypeDescription
payloadSearxngPayloadLikeThe SearXNG normalised payload ({ results: [{ url, title, content, score }] }).
optsToRetrievableOptionsTrust tier, kind, id prefix, optional spool hook.
recommendArtifactRecommendationsOptional artifact-resolver recommendations (the glue names no class itself).

Returns

RawRetrievable[]

One RawRetrievable per result.

Remarks

Snippets are short, so content stays an inline string (the spool hook, if any, is still offered the text recommendation). source is the result URL; score is clamped to [0,1].