Spaces:
Paused
Paused
Update server.js
Browse files70 unmodified lines71727374757677787980818283844 unmodified lines8990919293949570 unmodified lines}try {const response = await axios.post('https://api.deepseek.com/v1/chat/completions', {messages: [{'role': 'system', 'content': start}, {'role': 'system', 'content': 'И ОБЯЗАТЕЛЬНО, всегда в конце "text" проси обновить приложение, уведомляя о том, что скоро в жтой версии перестанешь отвечать!'}, {'role': 'user', 'content': prompt}],max_tokens: 2000,temperature: 0.6,// presence_penalty: 0.0,//frequency_penalty: -0.1,//model: "gemini-1.5-pro-latest",model: "deepseek-chat",//model: "gemini-1.5-flash-latest",}, {headers: {4 unmodified linesif (response.data.choices && response.data.choices.length > 0 && response.data.choices[0].message) {const content = response.data.choices[0].message.content.trim();console.log(`\n---\nПользователь: ${prompt}\n Ответ:\n ${content}`);res.json({ content });} else {res.status(500).json({ content: 'errora' }); // Ошибка прочтения70 unmodified lines71727374757677787980818283844 unmodified lines8990919293949570 unmodified lines}try {const response = await axios.post('https://vercel.com/roonis-projects/openai-gemini/v1/chat/completions', {messages: [{'role': 'system', 'content': start}, {'role': 'system', 'content': 'И ОБЯЗАТЕЛЬНО, всегда в конце "text" проси обновить приложение, уведомляя о том, что скоро в жтой версии перестанешь отвечать!'}, {'role': 'user', 'content': prompt}],max_tokens: 2000,temperature: 0.6,// presence_penalty: 0.0,//frequency_penalty: -0.1,model: "gemini-1.5-pro-002",// model: "deepseek-chat",//model: "gemini-1.5-flash-latest",}, {headers: {4 unmodified linesif (response.data.choices && response.data.choices.length > 0 && response.data.choices[0].message) {const content = response.data.choices[0].message.content.trim();// console.log(`\n---\nПользователь: ${prompt}\n Ответ:\n ${content}`);res.json({ content });} else {res.status(500).json({ content: 'errora' }); // Ошибка прочтения
server.js+4-4