Skip to content

Commit

Permalink
Improved api.createPayload() readability ↞ [auto-sync from `adamlui…
Browse files Browse the repository at this point in the history
…/chatgpt-apps`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed Aug 5, 2024
1 parent b597f4c commit 39fa049
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 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.5
// @version 2024.8.4.6
// @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 @@ -2267,19 +2267,20 @@
let payload = {}
if (api == 'OpenAI')
payload = { messages: msgs, model: 'gpt-3.5-turbo', max_tokens: 4000 }
else if (api == 'AIchatOS') {
else if (api == 'AIchatOS') {
payload = {
prompt: msgs[msgs.length - 1].content,
withoutContext: false, userId: apis.AIchatOS.userID, network: true
}
} else if (api == 'Free Chat') {
const availModels = apis['Free Chat'].availModels
const availModels = apis[api].availModels
payload = { messages: msgs, model: availModels[Math.floor(chatgpt.randomFloat() * availModels.length)] }
} else if (api == 'GPTforLove') {
payload = {
prompt: msgs[msgs.length - 1].content,
secret: generateGPTforLoveKey(), top_p: 1, temperature: 0.8,
systemMessage: 'You are ChatGPT, the version is GPT-4o, a large language model trained by OpenAI. Follow the user\'s instructions carefully.'
systemMessage: 'You are ChatGPT, the version is GPT-4o, a large language model trained by OpenAI.'
+ 'Follow the user\'s instructions carefully.'
}
if (apis.GPTforLove.parentID) payload.options = { parentMessageId: apis.GPTforLove.parentID }
} else if (api == 'MixerBox AI')
Expand Down

0 comments on commit 39fa049

Please sign in to comment.