fix: #751 do not cache request

This commit is contained in:
Yidadaa 2023-05-01 23:48:23 +08:00
parent 1aaf4ae5bc
commit 8f5c289818
1 changed files with 4 additions and 1 deletions

View File

@ -26,8 +26,11 @@ export async function requestOpenai(req: NextRequest) {
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${apiKey}`,
...(process.env.OPENAI_ORG_ID && { "OpenAI-Organization": process.env.OPENAI_ORG_ID }),
...(process.env.OPENAI_ORG_ID && {
"OpenAI-Organization": process.env.OPENAI_ORG_ID,
}),
},
cache: "no-store",
method: req.method,
body: req.body,
});