UNPKG

mongodb-rag-core

Version:

Common elements used by MongoDB Chatbot Framework components.

16 lines 738 B
import { Document } from "mongodb"; export interface TruncationOptions { maxStringLength?: number; maxArrayLength?: number; maxObjectDepth?: number; maxObjectKeys?: number; } export declare const defaultTruncationOptions: TruncationOptions; /** Truncate long values in the MongoDB outputs so that it fits within the context of the LLM. @param input The MongoDB output to truncate @param options Configuration for how to truncate different types of values @returns A new document with truncated values */ export declare function truncateDbOperationOutputForLlm<T extends Document | Document[] | null | number>(input: T, options?: TruncationOptions): T; //# sourceMappingURL=truncateDbOperationOutputForLlm.d.ts.map