Summarize Text With ChatGpt πŸ”§

Summarize the selected text with ChatGpt.

// Name: Summarize Text With ChatGpt
// Description: Summarize the selected text with ChatGpt.
// Author: Eduard Uffelmann    
// Linkedin: https://www.linkedin.com/in/euffelmann/
// Twitter: @schmedu_
// Website: https://schmedu.com

import "@johnlindquist/kit";
import { startChat } from "../lib/common";

let selectedText = await getSelectedText();

let task = `Could you please summarize the following text. Just answer with the summary.
\`\`\`
${selectedText}
\`\`\``;

await startChat({
    prompt: task,
    model: "gpt-3.5-turbo",
    temperature: 1,
    runPromptImmediately: true,
});
    
πŸ“₯ Input
Selected Text
πŸ“€ Output
Changed Selected Text
πŸ’» Setup
Easy
🏷 Tags️
text, replace text