Merge pull request #35 from danny-avila/rm-short-filter
fix: rm short filter
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user