From e5a3893f88926a6769b83f2f780650f13e56b000 Mon Sep 17 00:00:00 2001 From: Vinlic Date: Thu, 16 May 2024 14:03:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4response=5Fformat=E5=BF=85?= =?UTF-8?q?=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/routes/audio.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/routes/audio.ts b/src/api/routes/audio.ts index 9ad8ed9..a877169 100644 --- a/src/api/routes/audio.ts +++ b/src/api/routes/audio.ts @@ -56,7 +56,7 @@ export default { "/transcriptions": async (request: Request) => { request .validate("body.model", _.isString) - .validate("body.response_format", _.isString) + .validate("body.response_format", v => _.isUndefined(v) || _.isString(v)) .validate("headers.authorization", _.isString); // token切分 const tokens = core.tokenSplit(request.headers.authorization);