File tree Expand file tree Collapse file tree 4 files changed +8
-12
lines changed
Expand file tree Collapse file tree 4 files changed +8
-12
lines changed Original file line number Diff line number Diff line change 33// @description Adds the magic of AI to Amazon shopping
44// @author KudoAI
55// @namespace https://kudoai.com
6- // @version 2025.1.26.3
6+ // @version 2025.1.26.4
77// @license MIT
88// @icon https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon48.png?v=0fddfc7
99// @icon 64 https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon64.png?v=0fddfc7
26652665 else { // AI response
26662666 apis . GPTforLove . parentID = chunkObjs [ 0 ] . id || null // for contextual replies
26672667 chunkObjs . forEach ( obj => replyChunk += obj . delta || '' ) // accumulate AI reply text
2668- if ( respChunk . includes ( '"finish_reason":"stop"' ) ) isDone = true
26692668 }
26702669 } else if ( callerAPI == 'MixerBox AI' ) { // extract/normalize AI reply data
26712670 replyChunk = [ ...respChunk . matchAll ( / d a t a : ( .* ) / g) ] // arrayify data
26722671 . filter ( match => ! / m e s s a g e _ (?: s t a r t | e n d ) | d o n e / . test ( match ) ) // exclude signals
26732672 . map ( match => // normalize whitespace
26742673 match [ 1 ] . replace ( / \[ S P A C E \] / g, ' ' ) . replace ( / \[ N E W L I N E \] / g, '\n' ) )
26752674 . join ( '' ) // stringify AI reply text
2676- if ( / d a t a : (?: m e s s a g e _ e n d | d o n e ) / . test ( respChunk ) ) isDone = true
26772675 } textToShow += replyChunk
2676+ if ( new RegExp ( apis [ callerAPI ] . respPatterns ?. done ) . test ( respChunk ) ) isDone = true
26782677 }
26792678
26802679 // Show accumulated reply chunks
Original file line number Diff line number Diff line change 148148// @description :zu Yengeza izimpendulo ze-AI ku-Brave Search (inikwa amandla yi-GPT-4o!)
149149// @author KudoAI
150150// @namespace https://kudoai.com
151- // @version 2025.1.26.3
151+ // @version 2025.1.26.4
152152// @license MIT
153153// @icon https://assets.bravegpt.com/images/icons/bravegpt/icon48.png?v=df624b0
154154// @icon 64 https://assets.bravegpt.com/images/icons/bravegpt/icon64.png?v=df624b0
34153415 else { // AI response
34163416 apis . GPTforLove . parentID = chunkObjs [ 0 ] . id || null // for contextual replies
34173417 chunkObjs . forEach ( obj => replyChunk += obj . delta || '' ) // accumulate AI reply text
3418- if ( respChunk . includes ( '"finish_reason":"stop"' ) ) isDone = true
34193418 }
34203419 } else if ( callerAPI == 'MixerBox AI' ) { // extract/normalize AI reply data
34213420 replyChunk = [ ...respChunk . matchAll ( / d a t a : ( .* ) / g) ] // arrayify data
34223421 . filter ( match => ! / m e s s a g e _ (?: s t a r t | e n d ) | d o n e / . test ( match ) ) // exclude signals
34233422 . map ( match => // normalize whitespace
34243423 match [ 1 ] . replace ( / \[ S P A C E \] / g, ' ' ) . replace ( / \[ N E W L I N E \] / g, '\n' ) )
34253424 . join ( '' ) // stringify AI reply text
3426- if ( / d a t a : (?: m e s s a g e _ e n d | d o n e ) / . test ( respChunk ) ) isDone = true
34273425 } textToShow += replyChunk
3426+ if ( new RegExp ( apis [ callerAPI ] . respPatterns ?. done ) . test ( respChunk ) ) isDone = true
34283427 }
34293428
34303429 // Show accumulated reply chunks
Original file line number Diff line number Diff line change 148148// @description :zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!)
149149// @author KudoAI
150150// @namespace https://kudoai.com
151- // @version 2025.1.26.3
151+ // @version 2025.1.26.4
152152// @license MIT
153153// @icon https://assets.ddgpt.com/images/icons/duckduckgpt/icon48.png?v=06af076
154154// @icon 64 https://assets.ddgpt.com/images/icons/duckduckgpt/icon64.png?v=06af076
32993299 else { // AI response
33003300 apis . GPTforLove . parentID = chunkObjs [ 0 ] . id || null // for contextual replies
33013301 chunkObjs . forEach ( obj => replyChunk += obj . delta || '' ) // accumulate AI reply text
3302- if ( respChunk . includes ( '"finish_reason":"stop"' ) ) isDone = true
33033302 }
33043303 } else if ( callerAPI == 'MixerBox AI' ) { // extract/normalize AI reply data
33053304 replyChunk = [ ...respChunk . matchAll ( / d a t a : ( .* ) / g) ] // arrayify data
33063305 . filter ( match => ! / m e s s a g e _ (?: s t a r t | e n d ) | d o n e / . test ( match ) ) // exclude signals
33073306 . map ( match => // normalize whitespace
33083307 match [ 1 ] . replace ( / \[ S P A C E \] / g, ' ' ) . replace ( / \[ N E W L I N E \] / g, '\n' ) )
33093308 . join ( '' ) // stringify AI reply text
3310- if ( / d a t a : (?: m e s s a g e _ e n d | d o n e ) / . test ( respChunk ) ) isDone = true
33113309 } textToShow += replyChunk
3310+ if ( new RegExp ( apis [ callerAPI ] . respPatterns ?. done ) . test ( respChunk ) ) isDone = true
33123311 }
33133312
33143313 // Show accumulated reply chunks
Original file line number Diff line number Diff line change 149149// @description :zu Yengeza izimpendulo ze-AI ku-Google Search (inikwa amandla yi-Google Gemma + GPT-4o!)
150150// @author KudoAI
151151// @namespace https://kudoai.com
152- // @version 2025.1.26.3
152+ // @version 2025.1.26.4
153153// @license MIT
154154// @icon https://assets.googlegpt.io/images/icons/googlegpt/black/icon48.png?v=59409b2
155155// @icon 64 https://assets.googlegpt.io/images/icons/googlegpt/black/icon64.png?v=59409b2
35963596 else { // AI response
35973597 apis . GPTforLove . parentID = chunkObjs [ 0 ] . id || null // for contextual replies
35983598 chunkObjs . forEach ( obj => replyChunk += obj . delta || '' ) // accumulate AI reply text
3599- if ( respChunk . includes ( '"finish_reason":"stop"' ) ) isDone = true
36003599 }
36013600 } else if ( callerAPI == 'MixerBox AI' ) { // extract/normalize AI reply data
36023601 replyChunk = [ ...respChunk . matchAll ( / d a t a : ( .* ) / g) ] // arrayify data
36033602 . filter ( match => ! / m e s s a g e _ (?: s t a r t | e n d ) | d o n e / . test ( match ) ) // exclude signals
36043603 . map ( match => // normalize whitespace
36053604 match [ 1 ] . replace ( / \[ S P A C E \] / g, ' ' ) . replace ( / \[ N E W L I N E \] / g, '\n' ) )
36063605 . join ( '' ) // stringify AI reply text
3607- if ( / d a t a : (?: m e s s a g e _ e n d | d o n e ) / . test ( respChunk ) ) isDone = true
36083606 } textToShow += replyChunk
3607+ if ( new RegExp ( apis [ callerAPI ] . respPatterns ?. done ) . test ( respChunk ) ) isDone = true
36093608 }
36103609
36113610 // Show accumulated reply chunks
You can’t perform that action at this time.
0 commit comments