Skip to content

Commit

Permalink
refactor: uncomment importatnt code
Browse files Browse the repository at this point in the history
  • Loading branch information
Bensigo committed Oct 10, 2023
1 parent e8fce9d commit 434fcec
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pages/api/v2/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ export default async function POST(req: NextApiRequest, res: NextApiResponse) {

}

// const isValidChatSession = isValidSession(dailySession)
// if (!isValidChatSession){
// res.status(400).send("Expired session")
// return;
// }
const isValidChatSession = isValidSession(dailySession)
if (!isValidChatSession){
res.status(400).send("Expired session")
return;
}

const response = await openai.createChatCompletion({
stream: true,
Expand Down

0 comments on commit 434fcec

Please sign in to comment.