Skip to content

Instantly share code, notes, and snippets.

@BLamy
Created March 12, 2023 02:51
Show Gist options
  • Save BLamy/edca5b14af8596d0b40e133322f0aba0 to your computer and use it in GitHub Desktop.
Save BLamy/edca5b14af8596d0b40e133322f0aba0 to your computer and use it in GitHub Desktop.
Export prompt from open ai playground
[...document.querySelectorAll(
".text-input[placeholder='You are a helpful assistant.'], .text-input[placeholder='Enter a user message here.'], .text-input[placeholder='Enter an assistant message here.']"
)].map(x => ({
role: x.attributes.header ? x.attributes.header.nodeValue : "system",
content: x.value
}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment