A Node.js-powered AI agent that can perform fun and practical tasks directly from your terminal.
- Image Generator: Create visuals using DALL-E 3.
- Random Reddit Post: Fetch a post from any subreddit. (In progress)
- Dad Joke Generator: Get a random dad joke for a quick laugh.
- Node.js (Version 18 or higher)
- An OpenAI API key
- Clone the Repository
git clone https://github.com/saket030801/ai-agent.git cd ai-agent npm install
- Create a .env file in the root directory with the following content:
OPENAI_API_KEY = "<Your API Key>"
- Run the Application
node index.js "<Your Prompt to the agent>"
Prompt -> "Make a dad joke and generate an meme image using it".
-
Make sure that you have allowed the models(gpt-4o-mini, dall-e-3) in the OpenAI API settings Allow Models
-
You can change the subreddit name in the reddit.js file in the tools directory.
-
If there is an error in the response, try emptying the message array in db.json.