Skip to content

Commit

Permalink
Expanded queryisQuestion instructions in rqPrompt to Free Chat API
Browse files Browse the repository at this point in the history
+ Added whitespace for readability ↞ [auto-sync from `adamlui/chatgpt-apps/googlegpt`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed Aug 27, 2024
1 parent a56618f commit 59075a3
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions chatgpt/googlegpt/googlegpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-Google Search (inikwa amandla yi-Google Gemma + GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.8.27.3
// @version 2024.8.27.4
// @license MIT
// @icon https://media.googlegpt.io/images/icons/googlegpt/black/icon48.png?8652a6e
// @icon64 https://media.googlegpt.io/images/icons/googlegpt/black/icon64.png?8652a6e
Expand Down Expand Up @@ -2806,19 +2806,21 @@
const queryIsQuestion = /[??]/.test(query) && show.reply.src != 'shuffle'
const rqPrompt = 'Present to me a numbered list of '
+ `${ queryIsQuestion ? 'possible answers to this question' : 'queries related to this one' }:\n\n"${query}"\n\n`
+ ( get.related.api == 'Free Chat' ? '' // to evade long query automated detection
: queryIsQuestion ? ( 'Do not use placeholders/brackets for products, services, topics, etc. in the answers. '
+ 'The question is being asked by a chatbot on a search engine page, craft possible answers accordingly.' )
: ( // extended instructions for non-question queries
'Make sure to suggest a variety that can even greatly deviate from the original topic.'
+ ' For example, if the original query asked about someone\'s wife,'
+ ' a good related query could involve a different relative and using their name.'
+ ' Another example, if the query asked about a game/movie/show,'
+ ' good related queries could involve pertinent characters.'
+ ' Another example, if the original query asked how to learn JavaScript,'
+ ' good related queries could ask why/when/where instead, even replacing JS w/ other languages.'
+ ' But the key is variety. Do not be repetitive.'
+ ' You must entice user to want to ask one of your related queries.' ))
+ ( queryIsQuestion ? ( 'Do not use placeholders/brackets for products, services, topics, etc. in the answers. '
+ 'The question is being asked by a chatbot on a search engine page, craft possible answers accordingly.' )

// Extended instructions for non-question queries
: get.related.api == 'Free Chat' ? '' // to evade long query detection
: ( 'Make sure to suggest a variety that can even greatly deviate from the original topic. '
+ 'For example, if the original query asked about someone\'s wife, '
+ ' a good related query could involve a different relative and using their name. '
+ 'Another example, if the query asked about a game/movie/show, '
+ ' good related queries could involve pertinent characters. '
+ 'Another example, if the original query asked how to learn JavaScript, '
+ ' good related queries could ask why/when/where instead, even replacing JS w/ other languages. '
+ 'But the key is variety. Do not be repetitive. '
+ ' You must entice user to want to ask one of your related queries.' ))

+ ` Reply in ${config.replyLanguage}`

// Try diff API after 7s of no response
Expand Down

0 comments on commit 59075a3

Please sign in to comment.