3e99a7b9 by RSA

fix

1 parent 13d695fc
Showing 1 changed file with 0 additions and 7 deletions
...@@ -42,13 +42,6 @@ app.post('/api', async (req, res) => { ...@@ -42,13 +42,6 @@ app.post('/api', async (req, res) => {
42 } 42 }
43 43
44 let query_prompt = `${greetingPrompt}\n${message}`; 44 let query_prompt = `${greetingPrompt}\n${message}`;
45
46 let greetingPrompt = 'Hello, how can I assist you?'
47 const greetings = ['hi', 'hello', 'hey']
48 if (greetings.some((greeting) => message.toLowerCase().includes(greeting))) {
49 greetingPrompt = 'Hello, how can I help you today?'
50 }
51 let query_prompt = `${greetingPrompt}\n${message}`;
52 str_length = req.body.message.split(' ').length; 45 str_length = req.body.message.split(' ').length;
53 if (str_length>=800){ 46 if (str_length>=800){
54 arr_body = req.body.message.split("\n"); 47 arr_body = req.body.message.split("\n");
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!