Merge pull request #35 from danny-avila/rm-short-filter

fix: rm short filter
This commit is contained in:
Danny Avila 2023-03-11 12:10:56 -05:00 committed by GitHub
commit d2cb9957fe
3 changed files with 3 additions and 3 deletions

View file

@ -18,7 +18,7 @@ router.use('/sydney', askSydney);
router.post('/', async (req, res) => {
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');
}

View file

@ -8,7 +8,7 @@ const citationRegex = /\[\^\d+?\^]/g;
router.post('/', async (req, res) => {
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');
}

View file

@ -8,7 +8,7 @@ const citationRegex = /\[\^\d+?\^]/g;
router.post('/', async (req, res) => {
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');
}