Skip to content

Instantly share code, notes, and snippets.

@Konard
Forked from shinshin86/chatgpt-with-qa-format.js
Created December 15, 2022 12:53
Show Gist options
  • Save Konard/3332268fabf715a2688a3d239d37f0b6 to your computer and use it in GitHub Desktop.
Save Konard/3332268fabf715a2688a3d239d37f0b6 to your computer and use it in GitHub Desktop.
Script for displaying the conversing with ChatGPT in the console log in QA format.
// USAGE: After conversing with ChatGPT, run this code on the Chrome developer console.
const textList = []
document.querySelectorAll('.text-base').forEach((t, i) => {
textList.push(`${i % 2 === 0 ? "Q:" : "A:"} ${t.textContent}`)
})
console.log(textList.join('\n'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment