Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
philffm committed Jul 7, 2024
1 parent 6bb37e0 commit 2150b69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bookmarklet-generator/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ document.addEventListener('DOMContentLoaded', () => {
body: JSON.stringify({
model: 'gpt-3.5-turbo',
messages: [
{ role: 'system', content: 'You are a helpful assistant.' },
{ role: 'system', content: 'You summarize content from websites in a tailored and meaningful manner.' },
{ role: 'user', content: 'Summarize in valid HTML format with sections:' + prompt },
{ role: 'user', content: content }
]
Expand All @@ -102,7 +102,7 @@ document.addEventListener('DOMContentLoaded', () => {
const summaryContainer = document.createElement('blockquote');
summaryContainer.innerHTML = '<div><h2>AI Summary 🧙</h2>' + summary.replace(/\\n\\n/g, '<br>') + '</div>';
targetElement.insertAdjacentElement('afterend', summaryContainer);
targetElement.insertAdjacentElement('beforebegin', summaryContainer);
messageDiv.remove();
})
.catch(error => {
Expand Down

0 comments on commit 2150b69

Please sign in to comment.