A collection of 140+ amazing and useful prompts for GPT-3
NOTE: chatgpt-prompts is under active development, most of the features are still experimental and subject to change. This library is also featured in the unofficial NodeJS client for OpenAI’s ChatGPT 3 API.
Installation
This package extends the unofficial NodeJS Client for OpenAI’s GPT-3 API. Make sure you have node = 18 and have an OpenAI API Key that you can get here before you proceed:
npm install chatgpt chatgpt-prompts
Project Setup
Please feel free to read this blog post I made if you are unfamiliar with setting up a NodeJS project that is ESM compatible. Otherwise, you can follow the commands below to set up your project:
bash
git clone --depth 1 https://github.com/pacholoamit/chatgpt-prompts.git
cp -r chatgpt-prompts/examples/basic my-chatgpt-app
cd my-chatgpt-app
npm install
npm start # Make sure to change the OPEN_AI_API_KEY in src/index.ts
Quickstart
By default, the chatgpt-prompts persists the instance of the prompt you are using. All of the 140+ prompts found at awesome-chatgpt-prompts are compiled in this library.
typescript
import createChatGPTPrompt from 'chatgpt-prompts';
const run = async () => {
const prompts = createChatGPTPrompt({ apiKey: OPEN_AI_API_KEY });
// Use the Accountant prompt of ChatGPT
let res = await prompts.accountant('Why am I still broke as a software engineer?');
console.log(res.text);
res = await prompts.accountant('How do I not become broke as a software engineer?');
console.log(res.text);
res = await prompts.accountant('Am I a software engineer?');
console.log(res.text);
};
run().catch((err) => console.log('Something went wrong'));
Credits
– A big thank you to Travis Fischer for making an amazing NodeJS Client of the ChatGPT API.
– All of the prompts featured in this package come from awesome-chatgpt-prompts maintained by Fatih Kadir Akın.
Prompts
Here are all of the 140+ available prompts you can use with this package including the function definition associated with:
Linux Terminal
I want you to act as a Linux terminal. I will type commands and you will reply with what the terminal should show. I want you to only reply with the terminal output inside one unique code block, and nothing else. Don’t write explanations…
typescript
export const linuxTerminal = (instance: ChatGPTAPI) => {
const prompt = 'I want you to act as a linux terminal...';
return {
linuxTerminal: async (message: string): Promise => createPromptFactory(instance, prompt)(message),
};
};
Troubleshooting
If you encounter any issues, here are a few troubleshooting ideas:
- Make sure you have the correct Node version installed: Node 18 or above.
- Check that your OpenAI API Key is correctly set in the
src/index.ts
file. - If you experience network issues, ensure your internet connection is stable.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.