import { formatResponse } from "../utils/responseData.mjs";
import { searchChunkReference } from "../utils/AI/askDocQuestion/askDocQuestion.mjs";

//#region src/controllers/search.controller.ts
const searchDocUtil = async (req, res) => {
	const { input } = req.query;
	const docFileList = (await searchChunkReference(input, 30, .2)).map((doc) => doc.fileKey);
	const responseData = formatResponse({ data: Array.from(new Set(docFileList)) });
	res.json(responseData);
};

//#endregion
export { searchDocUtil };
//# sourceMappingURL=search.controller.mjs.map