🤖 Chat GPT Prompts
Chat GPT Prompts is a fascinating collection designed to enhance interactions with AI. It includes over 140 unique prompts that integrate seamlessly with the GPT-3 API, offering a variety of applications for both developers and users interested in artificial intelligence. Here's a detailed look into what this project offers and how to get started.
Project Overview
At its core, Chat GPT Prompts is a library that complements the unofficial NodeJS client for OpenAI’s GPT-3 API. It provides a vast selection of predefined conversation prompts that allow users to interact with AI in a structured manner. This project is particularly user-friendly, employing TypeScript to ensure code reliability and maintainability across setups.
Despite being in the experimental phase, Chat GPT Prompts can significantly streamline the development of AI-driven applications by providing adaptable, pre-made prompts that cater to various use cases.
Installation
To set up Chat GPT Prompts, there are a few prerequisites:
- Ensure you have Node.js version 18 or higher.
- Obtain an API key from OpenAI, which you can get from their platform.
With these in hand, installation is as simple as running the following npm command:
npm install chatgpt chatgpt-prompts
Setting Up a Project
For those unfamiliar with setting up a NodeJS project, especially those compatible with ECMAScript Modules (ESM), a comprehensive blog post is available to guide you through the essentials. Alternatively, you can follow these quick steps:
-
Clone the repository:
git clone --depth 1 https://github.com/pacholoamit/chatgpt-prompts.git
-
Copy and set up the example project:
cp -r chatgpt-prompts/examples/basic my-chatgpt-app cd my-chatgpt-app npm install
-
Before starting, make sure to update the
OPEN_AI_API_KEY
in yoursrc/index.ts
file. -
Start your application:
npm start
Quickstart Guide
With the installation complete, users can quickly jump into utilizing the extensive range of prompts available through the library. These prompts are compiled from the awesome-chatgpt-prompts repository and are ready to use out of the box. Here's how you can implement a basic prompt using TypeScript:
import { createChatGPTPrompt } from "chatgpt-prompts";
const run = async () => {
const prompts = createChatGPTPrompt({
apiKey: "OPEN_AI_API_KEY",
});
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);
};
run().catch((err) => console.log("Something went wrong"));
Prompts and Use Cases
The library encompasses a wide range of prompts suitable for diverse applications. Here are a few examples of what you can achieve:
- Linux Terminal: Simulate a Linux terminal by executing commands and retrieving outputs without explanations.
- English Translator and Improver: Translate text into English, improving and enriching the language.
- Interviewer: Engage in an interactive session where the AI plays the role of an interviewer.
- JavaScript Console: Execute JavaScript commands and see the console outputs.
Each prompt is meticulously defined to ensure it performs its intended function while maintaining an enriching interaction with the AI.
Acknowledgments
This project is brought to life thanks to the contributions of various developers and communities:
- Travis Fischer: For creating the robust NodeJS Client that connects to the ChatGPT API.
- Fatih Kadir Akın: For maintaining the awesome-chatgpt-prompts repository, which is the backbone of this library's vast collection.
Chat GPT Prompts continues to evolve, promising a myriad of improvements and new features in the future. Whether you're a seasoned developer or a curious hobbyist, this library offers the tools to explore the potential of AI conversational prompts.