Skip to content

Commit

Permalink
Bumped ai-chat-apis.json
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui committed Jan 26, 2025
1 parent b529a64 commit ff5a843
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 20 deletions.
11 changes: 6 additions & 5 deletions amazongpt/greasemonkey/amazongpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// @description Adds the magic of AI to Amazon shopping
// @author KudoAI
// @namespace https://kudoai.com
// @version 2025.1.26
// @version 2025.1.26.1
// @license MIT
// @icon https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon48.png?v=0fddfc7
// @icon64 https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon64.png?v=0fddfc7
Expand Down Expand Up @@ -226,7 +226,7 @@

// Init API data
const apis = Object.assign(Object.create(null), await new Promise(resolve => xhr({
method: 'GET', url: 'https://assets.aiwebextensions.com/data/ai-chat-apis.json?v=b7a8a8b',
method: 'GET', url: 'https://assets.aiwebextensions.com/data/ai-chat-apis.json?v=b529a64',
onload: resp => resolve(JSON.parse(resp.responseText))
})))
apis.AIchatOS.userID = '#/chat/' + Date.now()
Expand Down Expand Up @@ -2631,9 +2631,9 @@
const dataProcess = {

initFailFlags(api) { // escape/merge URLs w/ fail flags
const { failFlags = [], endpoint = apis[api].endpoints.completions, expectedOrigin } = apis[api],
const { respPatterns = {}, endpoint = apis[api].endpoints.completions, expectedOrigin } = apis[api],
escapedAPIurls = [endpoint, expectedOrigin.url].map(url => url.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'))
return new RegExp([...failFlags, ...escapedAPIurls].join('|'))
return new RegExp([respPatterns.fail, ...escapedAPIurls].filter(Boolean).join('|'))
},

stream(resp, { caller, callerAPI }) {
Expand All @@ -2649,7 +2649,8 @@

// Handle stream done
const respChunk = new TextDecoder('utf8').decode(new Uint8Array(value))
if (done || respChunk.includes(apis[callerAPI].watermark)) return handleProcessCompletion()
if (done || respChunk.includes(apis[callerAPI].respPatterns?.watermark))
return handleProcessCompletion()
if (env.browser.isChromium) { // clear/add timeout since ReadableStream.getReader() doesn't signal done
clearTimeout(this.timeout) ; this.timeout = setTimeout(handleProcessCompletion, 1500) }

Expand Down
11 changes: 6 additions & 5 deletions bravegpt/greasemonkey/bravegpt.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-Brave Search (inikwa amandla yi-GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2025.1.26
// @version 2025.1.26.1
// @license MIT
// @icon https://assets.bravegpt.com/images/icons/bravegpt/icon48.png?v=df624b0
// @icon64 https://assets.bravegpt.com/images/icons/bravegpt/icon64.png?v=df624b0
Expand Down Expand Up @@ -380,7 +380,7 @@

// Init API data
const apis = Object.assign(Object.create(null), await new Promise(resolve => xhr({
method: 'GET', url: 'https://assets.aiwebextensions.com/data/ai-chat-apis.json?v=b7a8a8b',
method: 'GET', url: 'https://assets.aiwebextensions.com/data/ai-chat-apis.json?v=b529a64',
onload: resp => resolve(JSON.parse(resp.responseText))
})))
apis.AIchatOS.userID = '#/chat/' + Date.now()
Expand Down Expand Up @@ -3381,9 +3381,9 @@
const dataProcess = {

initFailFlags(api) { // escape/merge URLs w/ fail flags
const { failFlags = [], endpoint = apis[api].endpoints.completions, expectedOrigin } = apis[api],
const { respPatterns = {}, endpoint = apis[api].endpoints.completions, expectedOrigin } = apis[api],
escapedAPIurls = [endpoint, expectedOrigin.url].map(url => url.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'))
return new RegExp([...failFlags, ...escapedAPIurls].join('|'))
return new RegExp([respPatterns.fail, ...escapedAPIurls].filter(Boolean).join('|'))
},

stream(resp, { caller, callerAPI }) {
Expand All @@ -3399,7 +3399,8 @@

// Handle stream done
const respChunk = new TextDecoder('utf8').decode(new Uint8Array(value))
if (done || respChunk.includes(apis[callerAPI].watermark)) return handleProcessCompletion()
if (done || respChunk.includes(apis[callerAPI].respPatterns?.watermark))
return handleProcessCompletion()
if (env.browser.isChromium) { // clear/add timeout since ReadableStream.getReader() doesn't signal done
clearTimeout(this.timeout) ; this.timeout = setTimeout(handleProcessCompletion, 1500) }

Expand Down
11 changes: 6 additions & 5 deletions duckduckgpt/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 2025.1.26
// @version 2025.1.26.1
// @license MIT
// @icon https://assets.ddgpt.com/images/icons/duckduckgpt/icon48.png?v=06af076
// @icon64 https://assets.ddgpt.com/images/icons/duckduckgpt/icon64.png?v=06af076
Expand Down Expand Up @@ -380,7 +380,7 @@

// Init API data
const apis = Object.assign(Object.create(null), await new Promise(resolve => xhr({
method: 'GET', url: 'https://assets.aiwebextensions.com/data/ai-chat-apis.json?v=b7a8a8b',
method: 'GET', url: 'https://assets.aiwebextensions.com/data/ai-chat-apis.json?v=b529a64',
onload: resp => resolve(JSON.parse(resp.responseText))
})))
apis.AIchatOS.userID = '#/chat/' + Date.now()
Expand Down Expand Up @@ -3265,9 +3265,9 @@
const dataProcess = {

initFailFlags(api) { // escape/merge URLs w/ fail flags
const { failFlags = [], endpoint = apis[api].endpoints.completions, expectedOrigin } = apis[api],
const { respPatterns = {}, endpoint = apis[api].endpoints.completions, expectedOrigin } = apis[api],
escapedAPIurls = [endpoint, expectedOrigin.url].map(url => url.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'))
return new RegExp([...failFlags, ...escapedAPIurls].join('|'))
return new RegExp([respPatterns.fail, ...escapedAPIurls].filter(Boolean).join('|'))
},

stream(resp, { caller, callerAPI }) {
Expand All @@ -3283,7 +3283,8 @@

// Handle stream done
const respChunk = new TextDecoder('utf8').decode(new Uint8Array(value))
if (done || respChunk.includes(apis[callerAPI].watermark)) return handleProcessCompletion()
if (done || respChunk.includes(apis[callerAPI].respPatterns?.watermark))
return handleProcessCompletion()
if (env.browser.isChromium) { // clear/add timeout since ReadableStream.getReader() doesn't signal done
clearTimeout(this.timeout) ; this.timeout = setTimeout(handleProcessCompletion, 1500) }

Expand Down
11 changes: 6 additions & 5 deletions googlegpt/greasemonkey/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 2025.1.26
// @version 2025.1.26.1
// @license MIT
// @icon https://assets.googlegpt.io/images/icons/googlegpt/black/icon48.png?v=59409b2
// @icon64 https://assets.googlegpt.io/images/icons/googlegpt/black/icon64.png?v=59409b2
Expand Down Expand Up @@ -569,7 +569,7 @@

// Init API data
const apis = Object.assign(Object.create(null), await new Promise(resolve => xhr({
method: 'GET', url: 'https://assets.aiwebextensions.com/data/ai-chat-apis.json?v=b7a8a8b',
method: 'GET', url: 'https://assets.aiwebextensions.com/data/ai-chat-apis.json?v=b529a64',
onload: resp => resolve(JSON.parse(resp.responseText))
})))
apis.AIchatOS.userID = '#/chat/' + Date.now()
Expand Down Expand Up @@ -3562,9 +3562,9 @@
const dataProcess = {

initFailFlags(api) { // escape/merge URLs w/ fail flags
const { failFlags = [], endpoint = apis[api].endpoints.completions, expectedOrigin } = apis[api],
const { respPatterns = {}, endpoint = apis[api].endpoints.completions, expectedOrigin } = apis[api],
escapedAPIurls = [endpoint, expectedOrigin.url].map(url => url.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'))
return new RegExp([...failFlags, ...escapedAPIurls].join('|'))
return new RegExp([respPatterns.fail, ...escapedAPIurls].filter(Boolean).join('|'))
},

stream(resp, { caller, callerAPI }) {
Expand All @@ -3580,7 +3580,8 @@

// Handle stream done
const respChunk = new TextDecoder('utf8').decode(new Uint8Array(value))
if (done || respChunk.includes(apis[callerAPI].watermark)) return handleProcessCompletion()
if (done || respChunk.includes(apis[callerAPI].respPatterns?.watermark))
return handleProcessCompletion()
if (env.browser.isChromium) { // clear/add timeout since ReadableStream.getReader() doesn't signal done
clearTimeout(this.timeout) ; this.timeout = setTimeout(handleProcessCompletion, 1500) }

Expand Down

0 comments on commit ff5a843

Please sign in to comment.