Spaces:
Running
Running
Update server.js
Browse files
server.js
CHANGED
@@ -41,15 +41,15 @@ app.post('/pl', async (req, res) => {
|
|
41 |
}
|
42 |
|
43 |
try {
|
44 |
-
const response = await axios.post('https://
|
45 |
messages: [{'role': 'system', 'content': start}, {'role': 'user', 'content': prompt}],
|
46 |
max_tokens: 4000,
|
47 |
temperature: 0.7,
|
48 |
-
model: "
|
49 |
presence_penalty: 0.4,
|
50 |
}, {
|
51 |
headers: {
|
52 |
-
'Authorization': `Bearer ${apiKey}`,
|
53 |
'Content-Type': 'application/json',
|
54 |
},
|
55 |
});
|
@@ -75,15 +75,15 @@ app.post('/pls', async (req, res) => {
|
|
75 |
}
|
76 |
|
77 |
try {
|
78 |
-
const response = await axios.post('https://
|
79 |
messages: [{'role': 'system', 'content': `${start}. Отвечай кратко, но понятно!`}, {'role': 'user', 'content': prompt}],
|
80 |
max_tokens: 2000,
|
81 |
temperature: 0.7,
|
82 |
-
model: "
|
83 |
presence_penalty: 0.4,
|
84 |
}, {
|
85 |
headers: {
|
86 |
-
'Authorization': `Bearer ${apiKey}`,
|
87 |
'Content-Type': 'application/json',
|
88 |
},
|
89 |
});
|
|
|
41 |
}
|
42 |
|
43 |
try {
|
44 |
+
const response = await axios.post('https://text.pollinations.ai/', {
|
45 |
messages: [{'role': 'system', 'content': start}, {'role': 'user', 'content': prompt}],
|
46 |
max_tokens: 4000,
|
47 |
temperature: 0.7,
|
48 |
+
model: "openai",
|
49 |
presence_penalty: 0.4,
|
50 |
}, {
|
51 |
headers: {
|
52 |
+
// 'Authorization': `Bearer ${apiKey}`,
|
53 |
'Content-Type': 'application/json',
|
54 |
},
|
55 |
});
|
|
|
75 |
}
|
76 |
|
77 |
try {
|
78 |
+
const response = await axios.post('https://text.pollinations.ai/', {
|
79 |
messages: [{'role': 'system', 'content': `${start}. Отвечай кратко, но понятно!`}, {'role': 'user', 'content': prompt}],
|
80 |
max_tokens: 2000,
|
81 |
temperature: 0.7,
|
82 |
+
model: "openai",
|
83 |
presence_penalty: 0.4,
|
84 |
}, {
|
85 |
headers: {
|
86 |
+
// 'Authorization': `Bearer ${apiKey}`,
|
87 |
'Content-Type': 'application/json',
|
88 |
},
|
89 |
});
|