UNPKG

taskforce-aiagent

Version:

TaskForce is a modular, open-source, production-ready TypeScript agent framework for orchestrating AI agents, LLM-powered autonomous agents, task pipelines, dynamic toolchains, RAG workflows and memory/retrieval systems.

20 lines (19 loc) 634 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LocalVectorRetriever = void 0; class LocalVectorRetriever { constructor(provider) { this.provider = provider; } async retrieve(query, options) { const records = await this.provider.loadRelevantMemory(query, options?.limit || 3, { agent: options?.agent, taskId: options?.taskId, }); if (options?.raw) { return records; } return records.map((r) => r.summary?.trim() || r.output?.trim() || ""); } } exports.LocalVectorRetriever = LocalVectorRetriever;