Update server.js
Browse files
server.js
CHANGED
|
@@ -36,21 +36,21 @@ app.post('/cr', async (req, res) => {
|
|
| 36 |
|
| 37 |
app.post('/pl', async (req, res) => {
|
| 38 |
const prompt = req.body.prompt;
|
| 39 |
-
|
| 40 |
|
| 41 |
if (!prompt) {
|
| 42 |
return res.status(400).json("wait"); // Не удалось принять данные
|
| 43 |
}
|
| 44 |
|
| 45 |
try {
|
| 46 |
-
const response = await axios.post('https://
|
| 47 |
messages: [{'role': 'system', 'content': start}, {'role': 'user', 'content': prompt}],
|
| 48 |
-
max_tokens:
|
| 49 |
temperature: 0.19,
|
| 50 |
-
|
| 51 |
}, {
|
| 52 |
headers: {
|
| 53 |
-
|
| 54 |
'Content-Type': 'application/json',
|
| 55 |
},
|
| 56 |
});
|
|
@@ -70,21 +70,21 @@ app.post('/pl', async (req, res) => {
|
|
| 70 |
|
| 71 |
app.post('/cre', async (req, res) => {
|
| 72 |
const prompt = req.body.prompt;
|
| 73 |
-
|
| 74 |
|
| 75 |
if (!prompt) {
|
| 76 |
return res.status(400).json("wait"); // Не удалось принять данные
|
| 77 |
}
|
| 78 |
|
| 79 |
try {
|
| 80 |
-
const response = await axios.post('https://
|
| 81 |
messages: [{'role': 'system', 'content': start}, {'role': 'system', 'content': 'И ОБЯЗАТЕЛЬНО, всегда в конце "text" проси обновить приложение, уведомляя о том, что скоро в жтой версии перестанешь отвечать!'}, {'role': 'user', 'content': prompt}],
|
| 82 |
-
max_tokens:
|
| 83 |
temperature: 0.19,
|
| 84 |
-
|
| 85 |
}, {
|
| 86 |
headers: {
|
| 87 |
-
|
| 88 |
'Content-Type': 'application/json',
|
| 89 |
},
|
| 90 |
});
|
|
@@ -104,21 +104,21 @@ app.post('/cre', async (req, res) => {
|
|
| 104 |
|
| 105 |
app.post('/crebeta', async (req, res) => {
|
| 106 |
const prompt = req.body.prompt;
|
| 107 |
-
|
| 108 |
|
| 109 |
if (!prompt) {
|
| 110 |
return res.status(400).json("wait"); // Не удалось принять данные
|
| 111 |
}
|
| 112 |
|
| 113 |
try {
|
| 114 |
-
const response = await axios.post('https://
|
| 115 |
messages: [{'role': 'system', 'content': startconnect}, {'role': 'user', 'content': prompt}],
|
| 116 |
-
max_tokens:
|
| 117 |
temperature: 0.24,
|
| 118 |
-
|
| 119 |
}, {
|
| 120 |
headers: {
|
| 121 |
-
|
| 122 |
'Content-Type': 'application/json',
|
| 123 |
},
|
| 124 |
});
|
|
|
|
| 36 |
|
| 37 |
app.post('/pl', async (req, res) => {
|
| 38 |
const prompt = req.body.prompt;
|
| 39 |
+
// const apiKey = req.body.api || getRandomApiKey();
|
| 40 |
|
| 41 |
if (!prompt) {
|
| 42 |
return res.status(400).json("wait"); // Не удалось принять данные
|
| 43 |
}
|
| 44 |
|
| 45 |
try {
|
| 46 |
+
const response = await axios.post('https://text.pollinations.ai/openai', {
|
| 47 |
messages: [{'role': 'system', 'content': start}, {'role': 'user', 'content': prompt}],
|
| 48 |
+
max_tokens: 1200,
|
| 49 |
temperature: 0.19,
|
| 50 |
+
// model: "gemini-1.5-pro-001",
|
| 51 |
}, {
|
| 52 |
headers: {
|
| 53 |
+
// 'Authorization': `Bearer ${apiKey}`,
|
| 54 |
'Content-Type': 'application/json',
|
| 55 |
},
|
| 56 |
});
|
|
|
|
| 70 |
|
| 71 |
app.post('/cre', async (req, res) => {
|
| 72 |
const prompt = req.body.prompt;
|
| 73 |
+
// const apiKey = req.body.api || getRandomApiKey();
|
| 74 |
|
| 75 |
if (!prompt) {
|
| 76 |
return res.status(400).json("wait"); // Не удалось принять данные
|
| 77 |
}
|
| 78 |
|
| 79 |
try {
|
| 80 |
+
const response = await axios.post('https://text.pollinations.ai/openai', {
|
| 81 |
messages: [{'role': 'system', 'content': start}, {'role': 'system', 'content': 'И ОБЯЗАТЕЛЬНО, всегда в конце "text" проси обновить приложение, уведомляя о том, что скоро в жтой версии перестанешь отвечать!'}, {'role': 'user', 'content': prompt}],
|
| 82 |
+
max_tokens: 1200,
|
| 83 |
temperature: 0.19,
|
| 84 |
+
// model: "gemini-1.5-pro-001",
|
| 85 |
}, {
|
| 86 |
headers: {
|
| 87 |
+
// 'Authorization': `Bearer ${apiKey}`,
|
| 88 |
'Content-Type': 'application/json',
|
| 89 |
},
|
| 90 |
});
|
|
|
|
| 104 |
|
| 105 |
app.post('/crebeta', async (req, res) => {
|
| 106 |
const prompt = req.body.prompt;
|
| 107 |
+
// const apiKey = req.body.api || getRandomApiKey();
|
| 108 |
|
| 109 |
if (!prompt) {
|
| 110 |
return res.status(400).json("wait"); // Не удалось принять данные
|
| 111 |
}
|
| 112 |
|
| 113 |
try {
|
| 114 |
+
const response = await axios.post('https://text.pollinations.ai/openai', {
|
| 115 |
messages: [{'role': 'system', 'content': startconnect}, {'role': 'user', 'content': prompt}],
|
| 116 |
+
max_tokens: 1200,
|
| 117 |
temperature: 0.24,
|
| 118 |
+
// model: "gemini-1.5-pro-001",
|
| 119 |
}, {
|
| 120 |
headers: {
|
| 121 |
+
// 'Authorization': `Bearer ${apiKey}`,
|
| 122 |
'Content-Type': 'application/json',
|
| 123 |
},
|
| 124 |
});
|