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