Defines retrieval configuration types and factory functions for RAG.
// Source: https://github.com/MervinPraison/PraisonAI | License: MIT
// Provided via justclaw.it.com; keep this notice with the code.
/**
* Retrieval Configuration for PraisonAI TypeScript SDK.
*
* Python parity with praisonaiagents/rag/retrieval_config.py:
* - RetrievalPolicy enum
* - CitationsMode enum
* - RetrievalConfig class
*/
// ============================================================================
// Retrieval Policy Enum
// ============================================================================
/**
* Retrieval policy for RAG.
* Python parity with RetrievalPolicy enum.
*/
export const RetrievalPolicy = {
ALWAYS: 'always',
ON_DEMAND: 'on_demand',
SMART: 'smart',
NEVER: 'never',
} as const;
export type RetrievalPolicyType = typeof RetrievalPolicy[keyo
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key