@mastra/rag
Version:
The Retrieval-Augmented Generation (RAG) module contains document processing and embedding utilities.
25 lines • 874 B
TypeScript
import type { Tool } from '@mastra/core/tools';
import { z } from 'zod';
export declare const baseSchema: {
queryText: z.ZodString;
topK: z.ZodCoercedNumber<unknown>;
};
export declare const outputSchema: z.ZodObject<{
relevantContext: z.ZodAny;
sources: z.ZodArray<z.ZodObject<{
id: z.ZodString;
metadata: z.ZodAny;
vector: z.ZodArray<z.ZodNumber>;
score: z.ZodNumber;
document: z.ZodString;
}, z.core.$strip>>;
}, z.core.$strip>;
export declare const filterSchema: z.ZodObject<{
filter: z.ZodCoercedString<unknown>;
queryText: z.ZodString;
topK: z.ZodCoercedNumber<unknown>;
}, z.core.$strip>;
export type RagTool<TInput, TOutput> = Tool<TInput, TOutput, unknown, unknown> & {
execute: NonNullable<Tool<TInput, TOutput, unknown, unknown>['execute']>;
};
//# sourceMappingURL=tool-schemas.d.ts.map