const require_utils_responseData = require('../utils/responseData.cjs');
const require_utils_AI_askDocQuestion_askDocQuestion = require('../utils/AI/askDocQuestion/askDocQuestion.cjs');

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

//#endregion
exports.searchDocUtil = searchDocUtil;
//# sourceMappingURL=search.controller.cjs.map