feat: add env

This commit is contained in:
Hk-Gosuto
2024-06-06 21:39:48 +08:00
parent 991dd0490f
commit c289305b05
7 changed files with 35 additions and 37 deletions

View File

@@ -108,7 +108,7 @@ export async function requestOpenai(req: NextRequest) {
fetchOptions.body = clonedBody;
// not undefined and is false
if (modelTable[jsonBody?.model ?? ""].available === false) {
if (modelTable[jsonBody?.model ?? ""]?.available === false) {
return NextResponse.json(
{
error: true,