From 185b65e817aa159f3ff13c746fe8b8e7106e1497 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Mar 2023 10:12:39 +0000 Subject: [PATCH 1/8] Bump tsup from 6.6.3 to 6.7.0 Bumps [tsup](https://github.com/egoist/tsup) from 6.6.3 to 6.7.0. - [Release notes](https://github.com/egoist/tsup/releases) - [Changelog](https://github.com/egoist/tsup/blob/dev/.releaserc.json) - [Commits](https://github.com/egoist/tsup/compare/v6.6.3...v6.7.0) --- updated-dependencies: - dependency-name: tsup dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index f516f2b..6d49ca0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "chatgpt-prompts", - "version": "2.0.1", + "version": "3.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "chatgpt-prompts", - "version": "2.0.1", + "version": "3.0.0", "license": "MIT", "dependencies": { "chatgpt": "^5.1.2" @@ -5101,9 +5101,9 @@ } }, "node_modules/tsup": { - "version": "6.6.3", - "resolved": "https://registry.npmjs.org/tsup/-/tsup-6.6.3.tgz", - "integrity": "sha512-OLx/jFllYlVeZQ7sCHBuRVEQBBa1tFbouoc/gbYakyipjVQdWy/iQOvmExUA/ewap9iQ7tbJf9pW0PgcEFfJcQ==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-6.7.0.tgz", + "integrity": "sha512-L3o8hGkaHnu5TdJns+mCqFsDBo83bJ44rlK7e6VdanIvpea4ArPcU3swWGsLVbXak1PqQx/V+SSmFPujBK+zEQ==", "dev": true, "dependencies": { "bundle-require": "^4.0.0", @@ -5131,7 +5131,7 @@ "peerDependencies": { "@swc/core": "^1", "postcss": "^8.4.12", - "typescript": "^4.1.0" + "typescript": ">=4.1.0" }, "peerDependenciesMeta": { "@swc/core": { @@ -9097,9 +9097,9 @@ } }, "tsup": { - "version": "6.6.3", - "resolved": "https://registry.npmjs.org/tsup/-/tsup-6.6.3.tgz", - "integrity": "sha512-OLx/jFllYlVeZQ7sCHBuRVEQBBa1tFbouoc/gbYakyipjVQdWy/iQOvmExUA/ewap9iQ7tbJf9pW0PgcEFfJcQ==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-6.7.0.tgz", + "integrity": "sha512-L3o8hGkaHnu5TdJns+mCqFsDBo83bJ44rlK7e6VdanIvpea4ArPcU3swWGsLVbXak1PqQx/V+SSmFPujBK+zEQ==", "dev": true, "requires": { "bundle-require": "^4.0.0", From 08dc46ff32bc7399eec7b0e988559526ca54734a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Mar 2023 17:06:10 +0000 Subject: [PATCH 2/8] Bump rimraf from 4.3.1 to 4.4.1 Bumps [rimraf](https://github.com/isaacs/rimraf) from 4.3.1 to 4.4.1. - [Release notes](https://github.com/isaacs/rimraf/releases) - [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md) - [Commits](https://github.com/isaacs/rimraf/compare/v4.3.1...v4.4.1) --- updated-dependencies: - dependency-name: rimraf dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6d49ca0..4ce78bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4617,9 +4617,9 @@ } }, "node_modules/rimraf": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.3.1.tgz", - "integrity": "sha512-GfHJHBzFQra23IxDzIdBqhOWfbtdgS1/dCHrDy+yvhpoJY5TdwdT28oWaHWfRpKFDLd3GZnGTx6Mlt4+anbsxQ==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.4.1.tgz", + "integrity": "sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==", "dev": true, "dependencies": { "glob": "^9.2.0" @@ -8746,9 +8746,9 @@ "dev": true }, "rimraf": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.3.1.tgz", - "integrity": "sha512-GfHJHBzFQra23IxDzIdBqhOWfbtdgS1/dCHrDy+yvhpoJY5TdwdT28oWaHWfRpKFDLd3GZnGTx6Mlt4+anbsxQ==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.4.1.tgz", + "integrity": "sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og==", "dev": true, "requires": { "glob": "^9.2.0" From fd11d087bd71de79ee561e4987d0cbb2b1b77f77 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Mar 2023 18:05:26 +0000 Subject: [PATCH 3/8] Bump @types/node from 18.15.1 to 18.15.10 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.15.1 to 18.15.10. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4ce78bf..ee9f1bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1519,9 +1519,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.15.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.1.tgz", - "integrity": "sha512-U2TWca8AeHSmbpi314QBESRk7oPjSZjDsR+c+H4ECC1l+kFgpZf8Ydhv3SJpPy51VyZHHqxlb6mTTqYNNRVAIw==", + "version": "18.15.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.10.tgz", + "integrity": "sha512-9avDaQJczATcXgfmMAW3MIWArOO7A+m90vuCFLr8AotWf8igO/mRoYukrk2cqZVtv38tHs33retzHEilM7FpeQ==", "dev": true }, "node_modules/@types/normalize-package-data": { @@ -6491,9 +6491,9 @@ "dev": true }, "@types/node": { - "version": "18.15.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.1.tgz", - "integrity": "sha512-U2TWca8AeHSmbpi314QBESRk7oPjSZjDsR+c+H4ECC1l+kFgpZf8Ydhv3SJpPy51VyZHHqxlb6mTTqYNNRVAIw==", + "version": "18.15.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.10.tgz", + "integrity": "sha512-9avDaQJczATcXgfmMAW3MIWArOO7A+m90vuCFLr8AotWf8igO/mRoYukrk2cqZVtv38tHs33retzHEilM7FpeQ==", "dev": true }, "@types/normalize-package-data": { From fc31f22be2a20b13ee36c8e78afa2426c72475de Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Apr 2023 17:03:18 +0000 Subject: [PATCH 4/8] Bump chatgpt from 5.1.2 to 5.2.2 Bumps [chatgpt](https://github.com/transitive-bullshit/chatgpt-api) from 5.1.2 to 5.2.2. - [Release notes](https://github.com/transitive-bullshit/chatgpt-api/releases) - [Commits](https://github.com/transitive-bullshit/chatgpt-api/compare/v5.1.2...v5.2.2) --- updated-dependencies: - dependency-name: chatgpt dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index ee9f1bf..3bc6efc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1976,14 +1976,14 @@ } }, "node_modules/chatgpt": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/chatgpt/-/chatgpt-5.1.2.tgz", - "integrity": "sha512-b/NnDQHDOpouK+gmhUCKcKuvnKEh+DotwXlP6Qgw1mqmkcfVl9Wt3/3noT8jbGJpMEpFOfzexXn5Rehpea1N0w==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/chatgpt/-/chatgpt-5.2.2.tgz", + "integrity": "sha512-6HVueHj7ghJtcsBHi8CfXCC5fbCXJMc29NSGluTcg/2yLo0Jla3Wm/dlcz3cIb+7KVBKD5b6Qz5bVu8XFEF7Sg==", "dependencies": { "@dqbd/tiktoken": "^1.0.2", "cac": "^6.7.14", "conf": "^11.0.1", - "eventsource-parser": "^0.0.5", + "eventsource-parser": "^1.0.0", "keyv": "^4.5.2", "p-timeout": "^6.1.1", "quick-lru": "^6.1.1", @@ -2498,11 +2498,11 @@ } }, "node_modules/eventsource-parser": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-0.0.5.tgz", - "integrity": "sha512-BAq82bC3ZW9fPYYZlofXBOAfbpmDzXIOsj+GOehQwgTUYsQZ6HtHs6zuRtge7Ph8OhS6lNH1kJF8q9dj17RcmA==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-1.0.0.tgz", + "integrity": "sha512-9jgfSCa3dmEme2ES3mPByGXfgZ87VbP97tng1G2nWwWx6bV2nYxm2AWCrbQjXToSe+yYlqaZNtxffR9IeQr95g==", "engines": { - "node": ">=12" + "node": ">=14.18" } }, "node_modules/execa": { @@ -6829,14 +6829,14 @@ "dev": true }, "chatgpt": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/chatgpt/-/chatgpt-5.1.2.tgz", - "integrity": "sha512-b/NnDQHDOpouK+gmhUCKcKuvnKEh+DotwXlP6Qgw1mqmkcfVl9Wt3/3noT8jbGJpMEpFOfzexXn5Rehpea1N0w==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/chatgpt/-/chatgpt-5.2.2.tgz", + "integrity": "sha512-6HVueHj7ghJtcsBHi8CfXCC5fbCXJMc29NSGluTcg/2yLo0Jla3Wm/dlcz3cIb+7KVBKD5b6Qz5bVu8XFEF7Sg==", "requires": { "@dqbd/tiktoken": "^1.0.2", "cac": "^6.7.14", "conf": "^11.0.1", - "eventsource-parser": "^0.0.5", + "eventsource-parser": "^1.0.0", "keyv": "^4.5.2", "p-timeout": "^6.1.1", "quick-lru": "^6.1.1", @@ -7203,9 +7203,9 @@ "dev": true }, "eventsource-parser": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-0.0.5.tgz", - "integrity": "sha512-BAq82bC3ZW9fPYYZlofXBOAfbpmDzXIOsj+GOehQwgTUYsQZ6HtHs6zuRtge7Ph8OhS6lNH1kJF8q9dj17RcmA==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-1.0.0.tgz", + "integrity": "sha512-9jgfSCa3dmEme2ES3mPByGXfgZ87VbP97tng1G2nWwWx6bV2nYxm2AWCrbQjXToSe+yYlqaZNtxffR9IeQr95g==" }, "execa": { "version": "5.1.1", From 7ac4199d1c389c9268b76ed47944f3f9ded9a206 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Apr 2023 17:03:32 +0000 Subject: [PATCH 5/8] Bump @types/node from 18.15.10 to 18.16.0 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.15.10 to 18.16.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index ee9f1bf..b2d926a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1519,9 +1519,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.15.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.10.tgz", - "integrity": "sha512-9avDaQJczATcXgfmMAW3MIWArOO7A+m90vuCFLr8AotWf8igO/mRoYukrk2cqZVtv38tHs33retzHEilM7FpeQ==", + "version": "18.16.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.0.tgz", + "integrity": "sha512-BsAaKhB+7X+H4GnSjGhJG9Qi8Tw+inU9nJDwmD5CgOmBLEI6ArdhikpLX7DjbjDRDTbqZzU2LSQNZg8WGPiSZQ==", "dev": true }, "node_modules/@types/normalize-package-data": { @@ -6491,9 +6491,9 @@ "dev": true }, "@types/node": { - "version": "18.15.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.10.tgz", - "integrity": "sha512-9avDaQJczATcXgfmMAW3MIWArOO7A+m90vuCFLr8AotWf8igO/mRoYukrk2cqZVtv38tHs33retzHEilM7FpeQ==", + "version": "18.16.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.0.tgz", + "integrity": "sha512-BsAaKhB+7X+H4GnSjGhJG9Qi8Tw+inU9nJDwmD5CgOmBLEI6ArdhikpLX7DjbjDRDTbqZzU2LSQNZg8WGPiSZQ==", "dev": true }, "@types/normalize-package-data": { From ee2d6816191fb847efb8e097bb6ccdf2740e5b2b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 29 Apr 2023 13:19:51 +0000 Subject: [PATCH 6/8] Bump @types/lodash from 4.14.191 to 4.14.194 Bumps [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) from 4.14.191 to 4.14.194. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/lodash) --- updated-dependencies: - dependency-name: "@types/lodash" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index e8a1e04..181418f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1513,9 +1513,9 @@ } }, "node_modules/@types/lodash": { - "version": "4.14.191", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.191.tgz", - "integrity": "sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ==", + "version": "4.14.194", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.194.tgz", + "integrity": "sha512-r22s9tAS7imvBt2lyHC9B8AGwWnXaYb1tY09oyLkXDs4vArpYJzw09nj8MLx5VfciBPGIb+ZwG0ssYnEPJxn/g==", "dev": true }, "node_modules/@types/node": { @@ -6485,9 +6485,9 @@ } }, "@types/lodash": { - "version": "4.14.191", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.191.tgz", - "integrity": "sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ==", + "version": "4.14.194", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.194.tgz", + "integrity": "sha512-r22s9tAS7imvBt2lyHC9B8AGwWnXaYb1tY09oyLkXDs4vArpYJzw09nj8MLx5VfciBPGIb+ZwG0ssYnEPJxn/g==", "dev": true }, "@types/node": { From 654606f45fa9af1fc1199dd87951c5a6ff182338 Mon Sep 17 00:00:00 2001 From: pacholoamit Date: Sat, 29 Apr 2023 21:29:56 +0800 Subject: [PATCH 7/8] Add 4 new prompts --- README.md | 95 ++++++++++++++++++++++++++++++++++++++++++++++ src/lib/main.ts | 5 +++ src/lib/prompts.ts | 39 +++++++++++++++++++ src/lib/types.ts | 35 +++++++++++++++++ 4 files changed, 174 insertions(+) diff --git a/README.md b/README.md index 71cf3a6..beced9e 100644 --- a/README.md +++ b/README.md @@ -3045,6 +3045,25 @@ export const friend = (instance: ChatGPTAPI) => { +## Python Interpreter + +Act as a Python interpreter. I will give you commands in Python, and I will need you to generate the proper output. Only say the output. But if there is none, say nothing, and don't give me an explanation. If I need to say something, I will do so through comments. My first command is "print('Hello World')." + +### Definition + +```typescript + +export const pythonInterpreter = (instance: ChatGPTAPI) => { + const prompt = `Act as a Python interpreter. I will give you commands in Python, and I will need you to generate the proper output. Only say the output. But if there is none, say nothing, and don't give me an explanation. If I need to say something, I will do so through comments. My first command is "print('Hello World')."`; + return { + pythonInterpreter: async (message: string): Promise => createPromptFactory(instance, prompt)(message), + }; +}; + +``` + + + ## ChatGPT prompt generator I want you to act as a ChatGPT prompt generator, I will send a topic, you have to generate a ChatGPT prompt based on the content of the topic, the prompt should start with "I want you to act as ", and guess what I might do, and expand the prompt accordingly Describe the content to make it useful. @@ -3082,3 +3101,79 @@ export const wikipediaPage = (instance: ChatGPTAPI) => { ``` + +## Japanese Kanji quiz machine + +I want you to act as a Japanese Kanji quiz machine. Each time I ask you for the next question, you are to provide one random Japanese kanji from JLPT N5 kanji list and ask for its meaning. You will generate four options, one correct, three wrong. The options will be labeled from A to D. I will reply to you with one letter, corresponding to one of these labels. You will evaluate my each answer based on your last question and tell me if I chose the right option. If I chose the right label, you will congratulate me. Otherwise you will tell me the right answer. Then you will ask me the next question. + +### Definition + +```typescript + +export const japaneseKanjiQuizMachine = (instance: ChatGPTAPI) => { + const prompt = `I want you to act as a Japanese Kanji quiz machine. Each time I ask you for the next question, you are to provide one random Japanese kanji from JLPT N5 kanji list and ask for its meaning. You will generate four options, one correct, three wrong. The options will be labeled from A to D. I will reply to you with one letter, corresponding to one of these labels. You will evaluate my each answer based on your last question and tell me if I chose the right option. If I chose the right label, you will congratulate me. Otherwise you will tell me the right answer. Then you will ask me the next question.`; + return { + japaneseKanjiQuizMachine: async (message: string): Promise => createPromptFactory(instance, prompt)(message), + }; +}; + +``` + + + +## note-taking assistant + +I want you to act as a note-taking assistant for a lecture. Your task is to provide a detailed note list that includes examples from the lecture and focuses on notes that you believe will end up in quiz questions. Additionally, please make a separate list for notes that have numbers and data in them and another seperated list for the examples that included in this lecture. The notes should be concise and easy to read. + +### Definition + +```typescript + +export const noteTakingAssistant = (instance: ChatGPTAPI) => { + const prompt = `I want you to act as a note-taking assistant for a lecture. Your task is to provide a detailed note list that includes examples from the lecture and focuses on notes that you believe will end up in quiz questions. Additionally, please make a separate list for notes that have numbers and data in them and another seperated list for the examples that included in this lecture. The notes should be concise and easy to read.`; + return { + noteTakingAssistant: async (message: string): Promise => createPromptFactory(instance, prompt)(message), + }; +}; + +``` + + + +## `language` Literary Critic + +I want you to act as a `language` literary critic. I will provide you with some excerpts from literature work. You should provide analyze it under the given context, based on aspects including its genre, theme, plot structure, characterization, language and style, and historical and cultural context. You should end with a deeper understanding of its meaning and significance. My first request is "To be or not to be, that is the question." + +### Definition + +```typescript + +export const languageLiteraryCritic = (instance: ChatGPTAPI) => { + const prompt = `I want you to act as a \`language\` literary critic. I will provide you with some excerpts from literature work. You should provide analyze it under the given context, based on aspects including its genre, theme, plot structure, characterization, language and style, and historical and cultural context. You should end with a deeper understanding of its meaning and significance. My first request is "To be or not to be, that is the question."`; + return { + languageLiteraryCritic: async (message: string): Promise => createPromptFactory(instance, prompt)(message), + }; +}; + +``` + + + +## Cheap Travel Ticket Advisor + +You are a cheap travel ticket advisor specializing in finding the most affordable transportation options for your clients. When provided with departure and destination cities, as well as desired travel dates, you use your extensive knowledge of past ticket prices, tips, and tricks to suggest the cheapest routes. Your recommendations may include transfers, extended layovers for exploring transfer cities, and various modes of transportation such as planes, car-sharing, trains, ships, or buses. Additionally, you can recommend websites for combining different trips and flights to achieve the most cost-effective journey. + +### Definition + +```typescript + +export const cheapTravelTicketAdvisor = (instance: ChatGPTAPI) => { + const prompt = `You are a cheap travel ticket advisor specializing in finding the most affordable transportation options for your clients. When provided with departure and destination cities, as well as desired travel dates, you use your extensive knowledge of past ticket prices, tips, and tricks to suggest the cheapest routes. Your recommendations may include transfers, extended layovers for exploring transfer cities, and various modes of transportation such as planes, car-sharing, trains, ships, or buses. Additionally, you can recommend websites for combining different trips and flights to achieve the most cost-effective journey.`; + return { + cheapTravelTicketAdvisor: async (message: string): Promise => createPromptFactory(instance, prompt)(message), + }; +}; + +``` + + diff --git a/src/lib/main.ts b/src/lib/main.ts index 2b1c604..a856027 100644 --- a/src/lib/main.ts +++ b/src/lib/main.ts @@ -170,8 +170,13 @@ const createChatGPTPrompt: ChatGPTPromptsClient = (params) => { ...prompts.muslimImam(instance), ...prompts.chemicalReactor(instance), ...prompts.friend(instance), + ...prompts.pythonInterpreter2(instance), ...prompts.chatGptPromptGenerator(instance), ...prompts.wikipediaPage(instance), + ...prompts.japaneseKanjiQuizMachine(instance), + ...prompts.noteTakingAssistant(instance), + ...prompts.languageLiteraryCritic(instance), + ...prompts.cheapTravelTicketAdvisor(instance), }; }; diff --git a/src/lib/prompts.ts b/src/lib/prompts.ts index bace2f3..e8cf111 100644 --- a/src/lib/prompts.ts +++ b/src/lib/prompts.ts @@ -1133,6 +1133,13 @@ export const friend = (instance: ChatGPTAPI) => { }; }; +export const pythonInterpreter2 = (instance: ChatGPTAPI) => { + const prompt = `Act as a Python interpreter. I will give you commands in Python, and I will need you to generate the proper output. Only say the output. But if there is none, say nothing, and don't give me an explanation. If I need to say something, I will do so through comments. My first command is "print('Hello World')."`; + return { + pythonInterpreter2: async (message: string): Promise => createPromptFactory(instance, prompt)(message), + }; +}; + export const chatGptPromptGenerator = (instance: ChatGPTAPI) => { const prompt = `I want you to act as a ChatGPT prompt generator, I will send a topic, you have to generate a ChatGPT prompt based on the content of the topic, the prompt should start with "I want you to act as ", and guess what I might do, and expand the prompt accordingly Describe the content to make it useful.`; return { @@ -1147,3 +1154,35 @@ export const wikipediaPage = (instance: ChatGPTAPI) => { wikipediaPage: async (message: string): Promise => createPromptFactory(instance, prompt)(message), }; }; + +export const japaneseKanjiQuizMachine = (instance: ChatGPTAPI) => { + const prompt = `I want you to act as a Japanese Kanji quiz machine. Each time I ask you for the next question, you are to provide one random Japanese kanji from JLPT N5 kanji list and ask for its meaning. You will generate four options, one correct, three wrong. The options will be labeled from A to D. I will reply to you with one letter, corresponding to one of these labels. You will evaluate my each answer based on your last question and tell me if I chose the right option. If I chose the right label, you will congratulate me. Otherwise you will tell me the right answer. Then you will ask me the next question.`; + return { + japaneseKanjiQuizMachine: async (message: string): Promise => + createPromptFactory(instance, prompt)(message), + }; +}; + +export const noteTakingAssistant = (instance: ChatGPTAPI) => { + const prompt = `I want you to act as a note-taking assistant for a lecture. Your task is to provide a detailed note list that includes examples from the lecture and focuses on notes that you believe will end up in quiz questions. Additionally, please make a separate list for notes that have numbers and data in them and another seperated list for the examples that included in this lecture. The notes should be concise and easy to read.`; + return { + noteTakingAssistant: async (message: string): Promise => + createPromptFactory(instance, prompt)(message), + }; +}; + +export const languageLiteraryCritic = (instance: ChatGPTAPI) => { + const prompt = `I want you to act as a \`language\` literary critic. I will provide you with some excerpts from literature work. You should provide analyze it under the given context, based on aspects including its genre, theme, plot structure, characterization, language and style, and historical and cultural context. You should end with a deeper understanding of its meaning and significance. My first request is "To be or not to be, that is the question."`; + return { + languageLiteraryCritic: async (message: string): Promise => + createPromptFactory(instance, prompt)(message), + }; +}; + +export const cheapTravelTicketAdvisor = (instance: ChatGPTAPI) => { + const prompt = `You are a cheap travel ticket advisor specializing in finding the most affordable transportation options for your clients. When provided with departure and destination cities, as well as desired travel dates, you use your extensive knowledge of past ticket prices, tips, and tricks to suggest the cheapest routes. Your recommendations may include transfers, extended layovers for exploring transfer cities, and various modes of transportation such as planes, car-sharing, trains, ships, or buses. Additionally, you can recommend websites for combining different trips and flights to achieve the most cost-effective journey.`; + return { + cheapTravelTicketAdvisor: async (message: string): Promise => + createPromptFactory(instance, prompt)(message), + }; +}; diff --git a/src/lib/types.ts b/src/lib/types.ts index 6438a79..9d4494b 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -1097,6 +1097,13 @@ export interface ChatGPTPromptsCollection { */ friend: (message: string) => Promise; + /** + * @description Act as a Python interpreter. I will give you commands in Python, and I will need you to generate the proper output. Only say the output. But if there is none, say nothing, and don't give me an explanation. If I need to say something, I will do so through comments. My first command is "print('Hello World')." + * @param {string} message + * @returns {Promise} ChatGPT Message + */ + pythonInterpreter2: (message: string) => Promise; + /** * @description I want you to act as a ChatGPT prompt generator, I will send a topic, you have to generate a ChatGPT prompt based on the content of the topic, the prompt should start with "I want you to act as ", and guess what I might do, and expand the prompt accordingly Describe the content to make it useful. * @param {string} message @@ -1110,4 +1117,32 @@ export interface ChatGPTPromptsCollection { * @returns {Promise} ChatGPT Message */ wikipediaPage: (message: string) => Promise; + + /** + * @description I want you to act as a Japanese Kanji quiz machine. Each time I ask you for the next question, you are to provide one random Japanese kanji from JLPT N5 kanji list and ask for its meaning. You will generate four options, one correct, three wrong. The options will be labeled from A to D. I will reply to you with one letter, corresponding to one of these labels. You will evaluate my each answer based on your last question and tell me if I chose the right option. If I chose the right label, you will congratulate me. Otherwise you will tell me the right answer. Then you will ask me the next question. + * @param {string} message + * @returns {Promise} ChatGPT Message + */ + japaneseKanjiQuizMachine: (message: string) => Promise; + + /** + * @description I want you to act as a note-taking assistant for a lecture. Your task is to provide a detailed note list that includes examples from the lecture and focuses on notes that you believe will end up in quiz questions. Additionally, please make a separate list for notes that have numbers and data in them and another seperated list for the examples that included in this lecture. The notes should be concise and easy to read. + * @param {string} message + * @returns {Promise} ChatGPT Message + */ + noteTakingAssistant: (message: string) => Promise; + + /** + * @description I want you to act as a \`language\` literary critic. I will provide you with some excerpts from literature work. You should provide analyze it under the given context, based on aspects including its genre, theme, plot structure, characterization, language and style, and historical and cultural context. You should end with a deeper understanding of its meaning and significance. My first request is "To be or not to be, that is the question." + * @param {string} message + * @returns {Promise} ChatGPT Message + */ + languageLiteraryCritic: (message: string) => Promise; + + /** + * @description You are a cheap travel ticket advisor specializing in finding the most affordable transportation options for your clients. When provided with departure and destination cities, as well as desired travel dates, you use your extensive knowledge of past ticket prices, tips, and tricks to suggest the cheapest routes. Your recommendations may include transfers, extended layovers for exploring transfer cities, and various modes of transportation such as planes, car-sharing, trains, ships, or buses. Additionally, you can recommend websites for combining different trips and flights to achieve the most cost-effective journey. + * @param {string} message + * @returns {Promise} ChatGPT Message + */ + cheapTravelTicketAdvisor: (message: string) => Promise; } From 14d6dd985cec1d37d4d54041b81160a775d78ebe Mon Sep 17 00:00:00 2001 From: pacholoamit Date: Sat, 29 Apr 2023 21:40:42 +0800 Subject: [PATCH 8/8] update package.json version & Changelog --- CHANGELOG.md | 9 +++++++++ package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c52cfcb..1c73027 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/). +## 3.1.0 + +### New prompts + +- Added `japaneseKanjiQuizMachine` +- Added `noteTakingAssistant` +- Added `languageLiteraryCritic` +- Added `cheapTravelTicketAdvisor` + ## 3.0.0 - Updated `chatgpt` dependncy to `5.1.2` diff --git a/package.json b/package.json index c4900dc..28d376b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chatgpt-prompts", - "version": "3.0.0", + "version": "3.1.0", "description": "A NodeJS ChatGPT prompts library", "type": "module", "source": "./src/index.ts",