Skip to content

Agent based AI using Ollama 3.1 405b, Perplexity & Groq to take simple user input, conduct analysis on market conditions for an industry or specific company, and generate a dynamic and personalized cold call email. Ideal for sales professionals, affiliate marketing or small businesses seeking to increase customer base.

Notifications You must be signed in to change notification settings

Jnich145/AutomatedEmail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AI-powered Market Research and Cold Email Generator

This Python script uses artificial intelligence to perform market research and generate personalized cold emails based on user input. It's designed to help businesses gather information about specific industries or companies and create targeted outreach emails.

Table of Contents

  1. Introduction
  2. Prerequisites
  3. Installation
  4. Setting Up API Keys
  5. Running the Script
  6. How It Works
  7. Customization
  8. Troubleshooting
  9. Additional Resources

Introduction

This script combines several AI technologies to automate the process of market research and cold email generation. It uses three different AI models:

  • Llama (via Together AI) for generating search queries and the final email
  • Perplexity AI for web research
  • Groq (not currently used in the script, but available for future expansion)

Prerequisites

Before you can use this script, you need to have the following installed on your computer:

  • Python 3.7 or higher
  • pip (Python package installer)

You should also be familiar with basic command-line operations.

Installation

  1. Create a new directory for your project:

    • mkdir market-research-email-generator
    • cd market-research-email-generator
  2. Create a virtual environment (this keeps your project dependencies separate from other Python projects):

    • python -m venv venv
  3. Activate the virtual environment:

    • On Windows: venv\Scripts\activate
    • On macOS and Linux: source venv/bin/activate
  4. Create a new file called requirements.txt and add the following lines:

    • python-dotenv
    • groq
    • together
    • openai
  5. Install the required packages:

    • pip install -r requirements.txt
  6. Create a new file called main.py and paste the entire script into it.

Setting Up API Keys

  1. Sign up for accounts and obtain API keys from:

    • Together AI
    • Perplexity AI
    • Groq (optional for now)
  2. Create a new file in your project directory called .env.

  3. Add your API keys to the .env file:

    • TOGETHER_API_KEY=your_together_api_key_here
    • OPENAI_API_KEY=your_perplexity_api_key_here
    • GROQ_API_KEY=your_groq_api_key_here

    Replace your_*_api_key_here with your actual API keys.

Running the Script

  1. Make sure your virtual environment is activated.

  2. Run the script:

    • python main.py
  3. Follow the prompts to enter information about your target industry or company.

  4. The script will generate search queries, perform web research, and create a cold email based on the results.

How It Works

  1. User Input: The script asks you whether you're targeting an industry or a specific company, and collects relevant information.

  2. Query Generation: It uses the Llama AI model to create optimized search queries based on your input.

  3. Web Research: The script uses these queries to perform web searches using the Perplexity AI model, which summarizes the most relevant information found online.

  4. Email Generation: Finally, it uses the Llama AI model again to create a personalized cold email based on the research results and your initial input.

Customization

You can customize the script by modifying the prompts sent to the AI models. Look for the prompt variables in the optimize_search_queries and generate_cold_email functions.

Troubleshooting

  • If you get an error about missing modules, make sure you've activated your virtual environment and installed all requirements.
  • If you get API errors, double-check that your API keys in the .env file are correct and that you have sufficient credits/quota with each service.

Additional Resources

Remember to keep your API keys secret and never share them publicly. Happy coding!

About

Agent based AI using Ollama 3.1 405b, Perplexity & Groq to take simple user input, conduct analysis on market conditions for an industry or specific company, and generate a dynamic and personalized cold call email. Ideal for sales professionals, affiliate marketing or small businesses seeking to increase customer base.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages