mongodb-chatbot-server
Version:
A chatbot server for retrieval augmented generation (RAG).
69 lines • 2.27 kB
TypeScript
import { ConversationsService } from "mongodb-rag-core";
import { Request as ExpressRequest, Response as ExpressResponse, NextFunction } from "express";
import { z } from "zod";
import { Logger } from "mongodb-rag-core/braintrust";
import { UpdateTraceFunc } from "./UpdateTraceFunc";
export type CommentMessageRequest = z.infer<typeof CommentMessageRequest>;
export declare const CommentMessageRequest: z.ZodObject<z.objectUtil.extendShape<{
headers: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
params: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
query: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
body: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
}, {
headers: z.ZodObject<{
"req-id": z.ZodString;
}, "strip", z.ZodTypeAny, {
"req-id": string;
}, {
"req-id": string;
}>;
params: z.ZodObject<{
conversationId: z.ZodString;
messageId: z.ZodString;
}, "strip", z.ZodTypeAny, {
conversationId: string;
messageId: string;
}, {
conversationId: string;
messageId: string;
}>;
body: z.ZodObject<{
comment: z.ZodString;
}, "strip", z.ZodTypeAny, {
comment: string;
}, {
comment: string;
}>;
}>, "strip", z.ZodTypeAny, {
params: {
conversationId: string;
messageId: string;
};
headers: {
"req-id": string;
};
body: {
comment: string;
};
query?: {} | undefined;
}, {
params: {
conversationId: string;
messageId: string;
};
headers: {
"req-id": string;
};
body: {
comment: string;
};
query?: {} | undefined;
}>;
export interface CommentMessageRouteParams {
conversations: ConversationsService;
maxCommentLength?: number;
updateTrace?: UpdateTraceFunc;
braintrustLogger?: Logger<true>;
}
export declare function makeCommentMessageRoute({ conversations, maxCommentLength, updateTrace, braintrustLogger, }: CommentMessageRouteParams): (req: ExpressRequest, res: ExpressResponse<void>, next: NextFunction) => Promise<ExpressResponse<any, Record<string, any>> | undefined>;
//# sourceMappingURL=commentMessage.d.ts.map