Skip to content

Commit

Permalink
Added Free Chat API ↞ [auto-sync from adamlui/chatgpt-apps]
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui authored and kudo-sync-bot committed Aug 4, 2024
1 parent fb71457 commit 94912bf
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions greasemonkey/duckduckgpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.8.4.1
// @version 2024.8.4.2
// @license MIT
// @icon https://media.ddgpt.com/images/icons/duckduckgpt/icon48.png?af89302
// @icon64 https://media.ddgpt.com/images/icons/duckduckgpt/icon64.png?af89302
Expand Down Expand Up @@ -176,6 +176,7 @@
// @connect greasyfork.org
// @connect jsdelivr.net
// @connect mixerbox.com
// @connect onrender.com
// @connect openai.com
// @connect sogou.com
// @require https://cdn.jsdelivr.net/npm/@kudoai/chatgpt.js@3.0.1/dist/chatgpt.min.js#sha256-jCJMPu044aK37jtC2wMMKnNgHbXJ5Pm9ZdIqDERob7k=
Expand Down Expand Up @@ -266,6 +267,9 @@
endpoint: 'https://api.binjie.fun/api/generateStream', expectedOrigin: 'https://chat18.aichatos8.com',
method: 'POST', streamable: true, accumulatesText: false, failFlags: ['很抱歉地', '系统公告'],
userID: '#/chat/' + Date.now() },
'Free Chat': {
endpoint: 'https://demo-g0ra.onrender.com/single/chat_messages', expectedOrigin: 'https://e10.frechat.xyz',
method: 'PUT', streamable: true, accumulatesText: false },
'GPTforLove': {
endpoint: 'https://api11.gptforlove.com/chat-process', expectedOrigin: 'https://ai27.gptforlove.com',
method: 'POST', streamable: true, accumulatesText: true },
Expand Down Expand Up @@ -2260,7 +2264,9 @@
prompt: msgs[msgs.length - 1].content,
withoutContext: false, userId: apis.AIchatOS.userID, network: true
}
} else if (api == 'GPTforLove') {
} else if (api == 'Free Chat')
payload = { messages: msgs, model: 'THUDM/glm-4-9b-chat' }
else if (api == 'GPTforLove') {
payload = {
prompt: msgs[msgs.length - 1].content,
secret: generateGPTforLoveKey(), top_p: 1, temperature: 0.8,
Expand Down Expand Up @@ -2429,6 +2435,12 @@
handleProcessCompletion()
} catch (err) { handleProcessError(err) }
} else if (caller.status != 'done') api.tryNew(caller)
} else if (caller.api == 'Free Chat') {
if (resp.responseText) {
try { // to show response or return related queries
respText = resp.responseText ; handleProcessCompletion()
} catch (err) { handleProcessError(err) }
} else if (caller.status != 'done') api.tryNew(caller)
} else if (caller.api == 'GPTforLove') {
if (resp.responseText && !resp.responseText.includes('Fail')) {
try { // to show response or return related queries
Expand Down

0 comments on commit 94912bf

Please sign in to comment.