├── .vscode └── settings.json ├── README.md ├── prompts ├── getIdeas.md ├── summarize.md ├── rewrite.md ├── simplify.md ├── getTitles.md ├── getParagraph.md ├── getTags.md ├── getOutline.md ├── getEmailPos.md ├── getEmailNeg.md └── summarizeLarge.md ├── manifest.json ├── LICENSE └── .github └── workflows └── main.yml /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "instantmarkdown.scroll": false, 3 | "instantmarkdown.autoOpenBrowser": false 4 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # gpt-prompt-templates 2 | This repo contains a collection of templates for use with the gpt-3 text generation model. 3 | -------------------------------------------------------------------------------- /prompts/getIdeas.md: -------------------------------------------------------------------------------- 1 | --- 2 | promptId: getIdeas 3 | name: 💡BrainStorm Ideas 4 | description: Brainstorm idea about the context. 5 | author: Noureddine 6 | tags: ideas, writing 7 | version: 0.0.1 8 | --- 9 | content: 10 | {{context}} 11 | prompt: 12 | brainstorm ideas about this content -------------------------------------------------------------------------------- /prompts/summarize.md: -------------------------------------------------------------------------------- 1 | --- 2 | promptId: summarize 3 | name: 🗞️ Summarize 4 | description: select a content and it will be summarized. 5 | author: Noureddine 6 | tags: writing, thinking, learning 7 | version: 0.0.1 8 | --- 9 | content: 10 | {{context}} 11 | prompt: 12 | summarize the content -------------------------------------------------------------------------------- /prompts/rewrite.md: -------------------------------------------------------------------------------- 1 | --- 2 | promptId: rewrite 3 | name: ✏️ Rewrite, Paraphrase 4 | description: select a content and it will be rewriten. 5 | author: Noureddine 6 | tags: writing 7 | version: 0.0.1 8 | --- 9 | content: 10 | {{context}} 11 | prompt: 12 | rewrite the content to make it more attractive -------------------------------------------------------------------------------- /prompts/simplify.md: -------------------------------------------------------------------------------- 1 | --- 2 | promptId: simplify 3 | name: 👼Simplify 4 | description: select a content and it will be simplified. 5 | author: Noureddine 6 | tags: thinking, writing 7 | version: 0.0.1 8 | --- 9 | content: 10 | {{context}} 11 | prompt: 12 | make the content very clear and easy to understand -------------------------------------------------------------------------------- /prompts/getTitles.md: -------------------------------------------------------------------------------- 1 | --- 2 | promptId: getTitles 3 | name: 🗃️ Get Blog Titles 4 | description: select a content and list of blog titles will be generated 5 | author: Noureddine 6 | tags: writing 7 | version: 0.0.1 8 | --- 9 | content: 10 | {{context}} 11 | prompt: 12 | suggest 10 attractive blog titles about this content: -------------------------------------------------------------------------------- /prompts/getParagraph.md: -------------------------------------------------------------------------------- 1 | --- 2 | promptId: getParagraph 3 | name: ✍️ Write paragraph 4 | description: select one item, a paragraph will be generated. 5 | required_values: title, outline 6 | author: Noureddine 7 | tags: writing 8 | version: 0.0.1 9 | --- 10 | title: 11 | {{title}} 12 | outline: 13 | {{outline}} 14 | 15 | # {{context}} -------------------------------------------------------------------------------- /prompts/getTags.md: -------------------------------------------------------------------------------- 1 | --- 2 | promptId: getTags 3 | name: 🏷️Get Tags for Your Content 4 | description: Select a content and Get suggest Tags for it 5 | author: Noureddine 6 | tags: writing, learning 7 | version: 0.0.1 8 | max_tokens: 30 9 | --- 10 | content: 11 | {{context}} 12 | prompt: 13 | suggest tags for the content in markdown format 14 | tags: -------------------------------------------------------------------------------- /prompts/getOutline.md: -------------------------------------------------------------------------------- 1 | --- 2 | promptId: getOutline 3 | name: 🗒️Generate Outline 4 | description: Select a title, an outline will be generated for You. 5 | required_values: title 6 | author: Noureddine 7 | tags: writing 8 | version: 0.0.1 9 | --- 10 | title: 11 | {{title}} 12 | prompt: 13 | write an outline for a blog for this title. 14 | outline: 15 | - -------------------------------------------------------------------------------- /prompts/getEmailPos.md: -------------------------------------------------------------------------------- 1 | --- 2 | promptId: getEmailPos 3 | name: ✉️ Reply to Email positively 😄 4 | description: select the email and a positive reply will be generated 5 | author: Noureddine 6 | tags: communication, email 7 | version: 0.0.1 8 | --- 9 | prompt: 10 | Reply to this email positively in a professional way. 11 | email: 12 | {{context}} 13 | reply: -------------------------------------------------------------------------------- /prompts/getEmailNeg.md: -------------------------------------------------------------------------------- 1 | --- 2 | promptId: getEmailNeg 3 | name: ✉️ Reply to Email negatively 😡 4 | description: select the email content and negative reply will be generated 5 | author: Noureddine 6 | tags: communication, email 7 | version: 0.0.1 8 | --- 9 | prompt: 10 | reply to this email negatively in professional way. 11 | email: 12 | {{context}} 13 | reply: -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageId": "default", 3 | "name": "Default Prompts Package", 4 | "version": "0.0.9", 5 | "minTextGeneratorVersion": "0.5.0", 6 | "description": "This is the main package that comes with Text Generator plugin in Obsidian", 7 | "author": "Noureddine Haouari", 8 | "tags": "writing, brainstorming", 9 | "authorUrl": "https://www.buymeacoffee.com/haouarine", 10 | "repo": "text-gen/gpt-3-prompt-templates" 11 | } -------------------------------------------------------------------------------- /prompts/summarizeLarge.md: -------------------------------------------------------------------------------- 1 | --- 2 | promptId: summarizeLarge 3 | name: 🗞️ Summarizes Large chunk of text 4 | description: uses langchain chain to summarize large chunk of text 5 | author: Noureddine 6 | tags: writing, thinking, learning 7 | version: 0.0.1 8 | mode: insert 9 | chain.type: map_reduce 10 | splitter.chunkSize: 1000 11 | splitter.chunkOverlap: 100 12 | max_tokens: 1000 13 | temperature: 0 14 | chain.maxTokens: 1000 15 | --- 16 | {{tg_selection}} 17 | *** 18 | {{output}} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 nhaouari 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | branches: 9 | - main 10 | 11 | jobs: 12 | build: 13 | permissions: write-all 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v3 17 | - name: Extract version from commit message 18 | id: ver 19 | run: | 20 | COMMIT_MESSAGE=$(git log -1 --pretty=%B) 21 | echo "Commit message: $COMMIT_MESSAGE" 22 | if [[ $COMMIT_MESSAGE =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then 23 | echo "version=$COMMIT_MESSAGE" >> $GITHUB_OUTPUT 24 | else 25 | echo "exit no version x.x.x in the commit message" 26 | exit 1 27 | fi 28 | # Remove existing data.json file 29 | - name: Remove data.json 30 | run: rm -f data.json 31 | 32 | # Get a list of all the files in the prompts folder 33 | - name: Get list of prompts 34 | run: ls prompts > prompts.txt 35 | 36 | # Remove the file extension from each file name 37 | - name: Remove file extensions 38 | run: sed -i 's/\..*$//' prompts.txt 39 | 40 | - name: Create data.json 41 | run: | 42 | # Add double quotes around each line 43 | sed -i 's/^/"/' prompts.txt 44 | sed -i 's/$/"/' prompts.txt 45 | 46 | # Add comma at the end of each line except the last one 47 | sed -i '$!s/$/,/' prompts.txt 48 | # Create the JSON file 49 | echo "{\"prompts\": [$(cat prompts.txt)]}" > data.json 50 | 51 | - name: Create Release 52 | id: create_release 53 | uses: actions/create-release@v1 54 | env: 55 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 56 | with: 57 | tag_name: ${{ steps.ver.outputs.version }} 58 | release_name: ${{ steps.ver.outputs.version }} 59 | draft: false 60 | prerelease: false 61 | - name: Attach data.json 62 | uses: actions/upload-release-asset@v1 63 | env: 64 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 65 | with: 66 | upload_url: ${{ steps.create_release.outputs.upload_url }} 67 | asset_path: data.json 68 | asset_name: data.json 69 | asset_content_type: application/json 70 | - name: Attach manifest.json 71 | uses: actions/upload-release-asset@v1 72 | env: 73 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 74 | with: 75 | upload_url: ${{ steps.create_release.outputs.upload_url }} 76 | asset_path: manifest.json 77 | asset_name: manifest.json 78 | asset_content_type: application/json 79 | --------------------------------------------------------------------------------