fix: rm short filter

This commit is contained in:
Daniel Avila 2023-03-11 12:10:00 -05:00
parent 8624062488
commit 78b4004ead
3 changed files with 3 additions and 3 deletions

View file

@ -18,7 +18,7 @@ router.use('/sydney', askSydney);
router.post('/', async (req, res) => { router.post('/', async (req, res) => {
let { model, text, parentMessageId, conversationId, chatGptLabel, promptPrefix } = req.body; let { model, text, parentMessageId, conversationId, chatGptLabel, promptPrefix } = req.body;
if (!text.trim().includes(' ') && text.length < 5) { if (text.length === 0) {
return handleError(res, 'Prompt empty or too short'); return handleError(res, 'Prompt empty or too short');
} }

View file

@ -8,7 +8,7 @@ const citationRegex = /\[\^\d+?\^]/g;
router.post('/', async (req, res) => { router.post('/', async (req, res) => {
const { model, text, ...convo } = req.body; const { model, text, ...convo } = req.body;
if (!text.trim().includes(' ') && text.length < 5) { if (text.length === 0) {
return handleError(res, 'Prompt empty or too short'); return handleError(res, 'Prompt empty or too short');
} }

View file

@ -8,7 +8,7 @@ const citationRegex = /\[\^\d+?\^]/g;
router.post('/', async (req, res) => { router.post('/', async (req, res) => {
const { model, text, ...convo } = req.body; const { model, text, ...convo } = req.body;
if (!text.trim().includes(' ') && text.length < 5) { if (text.length === 0) {
return handleError(res, 'Prompt empty or too short'); return handleError(res, 'Prompt empty or too short');
} }