Skip to content

Commit

Permalink
Added Dev Mode log of final reqData to api.createReqData() ↞ [aut…
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Jan 26, 2025
1 parent f932a66 commit 7f5fb41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions chatgpt/amazongpt/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.6
// @version 2025.1.26.7
// @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 @@ -2505,6 +2505,7 @@
},

async createReqData(api, msgs) { // returns payload for POST / query string for GET
log.caller = `api.createReqData('${api}', msgs)`
msgs = structuredClone(msgs) // avoid mutating global msgChain
const time = Date.now(), lastUserMsg = msgs[msgs.length - 1]
lastUserMsg.content = prompts.augment(lastUserMsg.content, { api: api })
Expand All @@ -2527,7 +2528,7 @@
: apis[api].method == 'GET' ? encodeURIComponent(lastUserMsg.content) : null
if (api == 'GPTforLove' && apis.GPTforLove.parentID) // include parentID for contextual replies
reqData.options = { parentMessageId: apis.GPTforLove.parentID }
return reqData
log.dev(reqData) ; return reqData
},

pick(caller) {
Expand Down

0 comments on commit 7f5fb41

Please sign in to comment.