From 3be4eb8ac022e80dcca0f4f9366fd454ec2b051c Mon Sep 17 00:00:00 2001 From: rpidanny Date: Fri, 6 Sep 2024 15:49:27 +0200 Subject: [PATCH] feat: add friendly text template --- apps/chrome-extension/src/pages/Content/prompts.ts | 2 ++ libs/llm-prompt-templates/src/core/tags.enum.ts | 1 + libs/llm-prompt-templates/src/core/writing.ts | 13 +++++++++++++ 3 files changed, 16 insertions(+) diff --git a/apps/chrome-extension/src/pages/Content/prompts.ts b/apps/chrome-extension/src/pages/Content/prompts.ts index 531f014..c0723a4 100644 --- a/apps/chrome-extension/src/pages/Content/prompts.ts +++ b/apps/chrome-extension/src/pages/Content/prompts.ts @@ -21,6 +21,7 @@ import { import { ProofReadAndCorrectPrompt, ProofReadPrompt, + RewriteFriendlyTextMessagePrompt, RewriteToCoolPrompt, RewriteToFormalPrompt, } from '@rpidanny/llm-prompt-templates/core/writing'; @@ -60,6 +61,7 @@ const codePrompts: IPrompt[] = [ ]; const writingPrompts: IPrompt[] = [ + RewriteFriendlyTextMessagePrompt, RewriteToFormalPrompt, RewriteToCoolPrompt, ProofReadPrompt, diff --git a/libs/llm-prompt-templates/src/core/tags.enum.ts b/libs/llm-prompt-templates/src/core/tags.enum.ts index 2d9223f..66fb134 100644 --- a/libs/llm-prompt-templates/src/core/tags.enum.ts +++ b/libs/llm-prompt-templates/src/core/tags.enum.ts @@ -17,4 +17,5 @@ export enum Tag { ProofRead = 'proofread', TreeOfThought = 'tree-of-thought', LeetCode = 'leetcode', + TextMessage = 'text-message', } diff --git a/libs/llm-prompt-templates/src/core/writing.ts b/libs/llm-prompt-templates/src/core/writing.ts index 02fdc8c..730f4fa 100644 --- a/libs/llm-prompt-templates/src/core/writing.ts +++ b/libs/llm-prompt-templates/src/core/writing.ts @@ -2,6 +2,19 @@ import { PromptCategory } from './categories.enum'; import { IPrompt } from './interfaces'; import { Tag } from './tags.enum'; +export const RewriteFriendlyTextMessagePrompt: IPrompt = { + name: 'Rewrite Friendly Text Message', + description: `This prompt rewrites your text to make it friendly, funny and elegant. It's useful for making your text messages more fun and interesting.`, + tags: [Tag.Transform, Tag.TextMessage], + category: PromptCategory.Writing, + content: `Rewrite the following text message to make it friendly, funny and elegant: + +\`\`\` +{text} +\`\`\` +`, +}; + export const RewriteToFormalPrompt: IPrompt = { name: 'Rewrite to Formal', description: `This prompt rewrites your text into formal writing. It's useful for writing emails, essays, reports, and other formal documents.`,