UNPKG

mongodb-rag-core

Version:

Common elements used by MongoDB Chatbot Framework components.

38 lines 1.62 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.VerifiedAnswer = exports.Question = void 0; const zod_1 = require("zod"); const References_1 = require("../References"); exports.Question = zod_1.z.object({ embedding: zod_1.z .array(zod_1.z.number()) .describe("The vector embedding of the question text."), embedding_model: zod_1.z .string() .describe("The name of the embedding model used to generate the embedding."), embedding_model_version: zod_1.z .string() .describe("The version of the embedding model used to generate the embedding."), text: zod_1.z.string().describe("The text of the question."), }); exports.VerifiedAnswer = zod_1.z.object({ _id: zod_1.z.string().describe("A unique identifier for the answer."), question: exports.Question, answer: zod_1.z .string() .describe("The text of the verified answer. This is returned verbatim to the user as the response to their question."), author_email: zod_1.z .string() .email() .describe("The email address of the author or source of the answer."), hidden: zod_1.z.boolean().optional(), references: zod_1.z .array(References_1.Reference) .describe("Reference links with additional information related to the answer."), created: zod_1.z.date().describe("The date and time the answer was created."), updated: zod_1.z .date() .optional() .describe("The date and time the answer was most recently updated."), }); //# sourceMappingURL=VerifiedAnswer.js.map