30791_fix
Showing
1 changed file
with
5 additions
and
0 deletions
| ... | @@ -74,6 +74,11 @@ const max_tokens = process.env.MAX_TOKENS_chatbot_plus ? parseInt(process.env.MA | ... | @@ -74,6 +74,11 @@ const max_tokens = process.env.MAX_TOKENS_chatbot_plus ? parseInt(process.env.MA |
| 74 | 74 | ||
| 75 | // Primary Open AI Route | 75 | // Primary Open AI Route |
| 76 | app.post('/api', async (req, res) => { | 76 | app.post('/api', async (req, res) => { |
| 77 | if(!req.get('host').includes(req.get('origin'))) { | ||
| 78 | res.status(401); | ||
| 79 | res.send('Method Not Allowed'); | ||
| 80 | return; | ||
| 81 | } | ||
| 77 | const { message, currentModel, temperature } = req.body; | 82 | const { message, currentModel, temperature } = req.body; |
| 78 | 83 | ||
| 79 | if (currentModel == "gpt-3.5-turbo" || currentModel == "gpt-3.5-turbo-0301") { | 84 | if (currentModel == "gpt-3.5-turbo" || currentModel == "gpt-3.5-turbo-0301") { | ... | ... |
-
Please register or sign in to post a comment