mongodb-rag-core
Version:
Common elements used by MongoDB Chatbot Framework components.
46 lines (45 loc) • 1.55 kB
TypeScript
import { z } from "zod";
export declare const ConversationEvalCaseSchema: z.ZodObject<{
name: z.ZodString;
expectation: z.ZodOptional<z.ZodString>;
messages: z.ZodArray<z.ZodObject<{
role: z.ZodEnum<["assistant", "user", "system"]>;
content: z.ZodString;
}, "strip", z.ZodTypeAny, {
content: string;
role: "system" | "assistant" | "user";
}, {
content: string;
role: "system" | "assistant" | "user";
}>, "many">;
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
skip: z.ZodOptional<z.ZodBoolean>;
expectedLinks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
name: string;
messages: {
content: string;
role: "system" | "assistant" | "user";
}[];
tags?: string[] | undefined;
expectation?: string | undefined;
skip?: boolean | undefined;
expectedLinks?: string[] | undefined;
}, {
name: string;
messages: {
content: string;
role: "system" | "assistant" | "user";
}[];
tags?: string[] | undefined;
expectation?: string | undefined;
skip?: boolean | undefined;
expectedLinks?: string[] | undefined;
}>;
export type ConversationEvalCase = z.infer<typeof ConversationEvalCaseSchema>;
/**
Get conversation eval cases from YAML file.
Throws if the YAML is not correctly formatted.
*/
export declare function getConversationsEvalCasesFromYaml(yamlData: string): ConversationEvalCase[];
//# sourceMappingURL=getConversationEvalCasesFromYaml.d.ts.map