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
| Parameter | Type | Description |
|---|---|---|
payload | SearxngPayloadLike | The SearXNG normalised payload ({ results: [{ url, title, content, score }] }). |
opts | ToRetrievableOptions | Trust tier, kind, id prefix, optional spool hook. |
recommend | ArtifactRecommendations | Optional artifact-resolver recommendations (the glue names no class itself). |
Returns
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].