Skip to content

Commit

Permalink
Limit conversations to 10 messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Keskimaki committed Apr 25, 2023
1 parent 7dcba47 commit 2a9d88c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/server/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ router.post('/stream', async (req, res) => {
const service = await Service.findByPk(id)
if (!service) return res.status(404).send('Service not found')

if (options.messages.length > 10)
return res.status(403).send('Conversation message limit reached')

// const usageAllowed = await checkUsage(user, service)
// if (!usageAllowed) return res.status(403).send('Usage limit reached')

Expand Down

0 comments on commit 2a9d88c

Please sign in to comment.