👮feat: moderation text (#1388)

* fixed some bugs and handling errors better

* feat: plugins support

* fix: prettier error message

* moved circular-json-es6 in /api

* docs: added openai moderation text

* fix(gptPlugins): incorrect merge

* discarding changes

* removed circular-json-es6
This commit is contained in:
Marco Beretta 2024-01-01 21:08:02 +01:00 committed by GitHub
parent 1cd5fdf4f0
commit c7306395e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 81 additions and 3 deletions

View file

@ -13,9 +13,11 @@ const {
setHeaders,
validateEndpoint,
buildEndpointOption,
moderateText,
} = require('~/server/middleware');
const { logger } = require('~/config');
router.use(moderateText);
router.post('/abort', handleAbort());
router.post('/', validateEndpoint, buildEndpointOption, setHeaders, async (req, res) => {