UNPKG

mongodb-rag-core

Version:

Common elements used by MongoDB Chatbot Framework components.

38 lines 1.45 kB
import { OpenAI } from "openai"; import { CollectionInfo, DatabaseMetadata } from "./getDatabaseMetadata"; import { z } from "zod"; import { LlmOptions } from "./LlmOptions"; declare function makeDetailedCollectionDescriptionSchema(collectionInfo: CollectionInfo): z.ZodObject<{ typeScriptSchema: z.ZodString; indexDescriptions: z.ZodArray<z.ZodObject<{ name: z.ZodEnum<[string, ...string[]]>; description: z.ZodString; }, "strip", z.ZodTypeAny, { description: string; name: string; }, { description: string; name: string; }>, "many">; }, "strip", z.ZodTypeAny, { typeScriptSchema: string; indexDescriptions: { description: string; name: string; }[]; }, { typeScriptSchema: string; indexDescriptions: { description: string; name: string; }[]; }>; export type DetailedCollectionDescriptions = z.infer<ReturnType<typeof makeDetailedCollectionDescriptionSchema>>; interface GenerateAnnotatedCollectionSchemaParams { collectionMetadata: CollectionInfo; databaseMetadata: DatabaseMetadata; llm: LlmOptions; } export declare const makeGenerateAnnotatedCollectionSchema: (openAiClient: OpenAI) => ({ collectionMetadata, databaseMetadata, llm: llmOptions, }: GenerateAnnotatedCollectionSchemaParams) => Promise<DetailedCollectionDescriptions>; export {}; //# sourceMappingURL=generateAnnotatedCollectionSchema.d.ts.map