From 2c7f2e2014aa54f1cd1272bc48f6bf1156e4ce1b Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Mon, 26 May 2025 23:18:14 +0300 Subject: [PATCH 1/2] Pollinations: fix headers, add samplers --- public/index.html | 8 ++++---- public/scripts/openai.js | 4 ---- src/endpoints/backends/chat-completions.js | 5 ++++- src/endpoints/openai.js | 1 + 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/index.html b/public/index.html index a7c62b44f..c37e49d70 100644 --- a/public/index.html +++ b/public/index.html @@ -691,7 +691,7 @@ -
+
Temperature
@@ -704,7 +704,7 @@
-
+
Frequency Penalty
@@ -717,7 +717,7 @@
-
+
Presence Penalty
@@ -743,7 +743,7 @@
-
+
Top P
diff --git a/public/scripts/openai.js b/public/scripts/openai.js index ce05244a7..025afe46e 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -2270,10 +2270,6 @@ async function sendOpenAIRequest(type, messages, signal) { } if (isPollinations) { - delete generate_data.temperature; - delete generate_data.top_p; - delete generate_data.frequency_penalty; - delete generate_data.presence_penalty; delete generate_data.max_tokens; } diff --git a/src/endpoints/backends/chat-completions.js b/src/endpoints/backends/chat-completions.js index 5e0205771..19a32b07b 100644 --- a/src/endpoints/backends/chat-completions.js +++ b/src/endpoints/backends/chat-completions.js @@ -1340,11 +1340,14 @@ router.post('/generate', function (request, response) { } else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.POLLINATIONS) { apiUrl = API_POLLINATIONS; apiKey = 'NONE'; - headers = {}; + headers = { + 'Authorization': '', + }; bodyParams = { reasoning_effort: request.body.reasoning_effort, private: true, referrer: 'sillytavern', + seed: request.body.seed ?? Math.floor(Math.random() * 99999999), }; } else { console.warn('This chat completion source is not supported yet.'); diff --git a/src/endpoints/openai.js b/src/endpoints/openai.js index 3604634c3..bde251fe8 100644 --- a/src/endpoints/openai.js +++ b/src/endpoints/openai.js @@ -148,6 +148,7 @@ router.post('/caption-image', async (request, response) => { } if (request.body.api === 'pollinations') { + headers = { Authorization: '' }; apiUrl = 'https://text.pollinations.ai/openai/chat/completions'; } From 71de864a5e28a149f403f7407848cc57d9400c44 Mon Sep 17 00:00:00 2001 From: Radovenchyk Date: Thu, 29 May 2025 21:02:21 +0300 Subject: [PATCH 2/2] docs: edited the link to the forks badge (#4059) * Update readme.md * Update readme.md --- .github/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/readme.md b/.github/readme.md index 14f950e12..e2ff2f365 100644 --- a/.github/readme.md +++ b/.github/readme.md @@ -7,7 +7,7 @@ English | [German](readme-de_de.md) | [中文](readme-zh_cn.md) | [繁體中文](readme-zh_tw.md) | [日本語](readme-ja_jp.md) | [Русский](readme-ru_ru.md) | [한국어](readme-ko_kr.md) [![GitHub Stars](https://img.shields.io/github/stars/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/stargazers) -[![GitHub Forks](https://img.shields.io/github/forks/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/network) +[![GitHub Forks](https://img.shields.io/github/forks/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/forks) [![GitHub Issues](https://img.shields.io/github/issues/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/issues) [![GitHub Pull Requests](https://img.shields.io/github/issues-pr/SillyTavern/SillyTavern.svg)](https://github.com/SillyTavern/SillyTavern/pulls)