Update server.js
Browse files
server.js
CHANGED
|
@@ -36,7 +36,7 @@ app.post('/update', async (req, res) => {
|
|
| 36 |
|
| 37 |
app.post('/pl', async (req, res) => {
|
| 38 |
const prompt = req.body.prompt;
|
| 39 |
-
|
| 40 |
|
| 41 |
let prs; // Объявление переменной prs перед использованием
|
| 42 |
|
|
@@ -51,14 +51,14 @@ app.post('/pl', async (req, res) => {
|
|
| 51 |
}
|
| 52 |
|
| 53 |
try {
|
| 54 |
-
const response = await axios.post('https://openai-gemini-iota.vercel.app/v1/chat/completions
|
| 55 |
messages: [{'role': 'system', 'content': prs}, {'role': 'user', 'content': prompt}],
|
| 56 |
max_tokens: 2000,
|
| 57 |
temperature: 0.19,
|
| 58 |
-
|
| 59 |
}, {
|
| 60 |
headers: {
|
| 61 |
-
|
| 62 |
'Content-Type': 'application/json',
|
| 63 |
},
|
| 64 |
});
|
|
@@ -77,7 +77,7 @@ app.post('/pl', async (req, res) => {
|
|
| 77 |
|
| 78 |
app.post('/plbeta', async (req, res) => {
|
| 79 |
const prompt = req.body.prompt;
|
| 80 |
-
const apiKey = req.body.api || getRandomApiKey();
|
| 81 |
|
| 82 |
let prs; // Объявление переменной prs перед использованием
|
| 83 |
|
|
@@ -92,14 +92,14 @@ app.post('/plbeta', async (req, res) => {
|
|
| 92 |
}
|
| 93 |
|
| 94 |
try {
|
| 95 |
-
const response = await axios.post('https://
|
| 96 |
messages: [{'role': 'system', 'content': prs}, {'role': 'user', 'content': prompt}],
|
| 97 |
max_tokens: 2000,
|
| 98 |
-
temperature: 0.
|
| 99 |
-
|
| 100 |
}, {
|
| 101 |
headers: {
|
| 102 |
-
|
| 103 |
'Content-Type': 'application/json',
|
| 104 |
},
|
| 105 |
});
|
|
|
|
| 36 |
|
| 37 |
app.post('/pl', async (req, res) => {
|
| 38 |
const prompt = req.body.prompt;
|
| 39 |
+
// const apiKey = req.body.api || getRandomApiKey();
|
| 40 |
|
| 41 |
let prs; // Объявление переменной prs перед использованием
|
| 42 |
|
|
|
|
| 51 |
}
|
| 52 |
|
| 53 |
try {
|
| 54 |
+
const response = await axios.post('https://text.pollinations.ai/openai', { //https://openai-gemini-iota.vercel.app/v1/chat/completions
|
| 55 |
messages: [{'role': 'system', 'content': prs}, {'role': 'user', 'content': prompt}],
|
| 56 |
max_tokens: 2000,
|
| 57 |
temperature: 0.19,
|
| 58 |
+
// model: "gemini-1.5-pro-001",
|
| 59 |
}, {
|
| 60 |
headers: {
|
| 61 |
+
// 'Authorization': `Bearer ${apiKey}`,
|
| 62 |
'Content-Type': 'application/json',
|
| 63 |
},
|
| 64 |
});
|
|
|
|
| 77 |
|
| 78 |
app.post('/plbeta', async (req, res) => {
|
| 79 |
const prompt = req.body.prompt;
|
| 80 |
+
//const apiKey = req.body.api || getRandomApiKey();
|
| 81 |
|
| 82 |
let prs; // Объявление переменной prs перед использованием
|
| 83 |
|
|
|
|
| 92 |
}
|
| 93 |
|
| 94 |
try {
|
| 95 |
+
const response = await axios.post('https://text.pollinations.ai/openai', { //https://openai-gemini-iota.vercel.app/v1/chat/completions
|
| 96 |
messages: [{'role': 'system', 'content': prs}, {'role': 'user', 'content': prompt}],
|
| 97 |
max_tokens: 2000,
|
| 98 |
+
temperature: 0.19,
|
| 99 |
+
// model: "gemini-1.5-pro-001",
|
| 100 |
}, {
|
| 101 |
headers: {
|
| 102 |
+
// 'Authorization': `Bearer ${apiKey}`,
|
| 103 |
'Content-Type': 'application/json',
|
| 104 |
},
|
| 105 |
});
|