AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

✨ [Feature] Sending Emails

Open riensen opened this issue 2 years ago • 7 comments

Background

Currently, AutoGPT is unable to send emails. This features provides to capability for AutoGPT to send simple emails using standard SMTP.

Changes

  • implemented email command: autogpt/commands/email.py
  • integration via autogpt/prompt.py and autogpt/prompt.py https://github.com/Significant-Gravitas/Auto-GPT/compare/master...riensen:Auto-GPT:master#diff-ea57237ee734eb84f1972d815e32e279b796d84c212fde8e3cff71060a50a7b3
  • updated README provides setup instructions

Documentation

  • send_email function is documented
  • updated README provides setup instructions

Test Plan

Run autogpt with goals of ['send an email to [email protected] to introduce yourself'], name "CommunicatorGPT" role of "communicate". Check trash-mail.com with temporary account "send.email.autogpt" for message of style:

Hello,

My name is CommunicatorGPT and I am an LLM. I am writing to introduce myself and to let you know that I will be terminating shortly. Thank you for your time.

Best regards,
CommunicatorGPT
sending-emails email-received

PR Quality Checklist

  • [X] My pull request is atomic and focuses on a single change.
  • [X] I have thoroughly tested my changes with multiple different prompts.
  • [X] I have considered potential risks and mitigations for my changes.
  • [X] I have documented my changes clearly and comprehensively.
  • [X] I have not snuck in any "extra" small tweaks changes

riensen avatar Apr 16 '23 18:04 riensen

@riensen CI failed

nponeccop avatar Apr 16 '23 20:04 nponeccop

This is just making it too easy for the spammers...

Pwuts avatar Apr 16 '23 22:04 Pwuts

This is just making it too easy for the spammers...

I understand your concerns about the potential misuse by spammers. However, I would like to present some points on this:

  1. Important Use Case: The capability to write emails is crucial for the development of sophisticated applications like virtual assistants or EntrepreneurGPT. By excluding this feature, we limit the potential of Auto-GPT and hinder its progress towards becoming a comprehensive tool for various use cases.
  2. Spammers Already Utilize GPT: There is evidence to suggest that spammers are already using GPT-like models to enhance their strategies, as seen in this tweet: twitter.com/AKASpencerScott/status/1638996893576601600. Therefore, integrating this feature in Auto-GPT does not necessarily enable spammers. It's important to recognize that GPT, and not Auto-GPT, is the enabler in this context.
  3. Adaptation to Transformative Technologies: It's worth noting that many groundbreaking technologies, such as drones, have initially been misused for illegal activities. Over time, however, society and regulatory bodies have adapted to minimize these negative uses while maximizing the benefits.

In conclusion, I believe the potential advantages of adding this email feature into Auto-GPT far outweigh the risks.

riensen avatar Apr 17 '23 08:04 riensen

Thanks for elaborating! :)

Pwuts avatar Apr 17 '23 09:04 Pwuts

@nponeccop please reapprove after I made some minor changes.

riensen avatar Apr 17 '23 15:04 riensen

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

github-actions[bot] avatar Apr 17 '23 16:04 github-actions[bot]

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

github-actions[bot] avatar Apr 17 '23 18:04 github-actions[bot]

@nponeccop should be good now. Please approve again.

riensen avatar Apr 17 '23 18:04 riensen

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

github-actions[bot] avatar Apr 17 '23 22:04 github-actions[bot]

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

github-actions[bot] avatar Apr 18 '23 07:04 github-actions[bot]

@riensen sorry for the delay in merging. We appreciate the effort and are currently working to ship plugin support above all else (#757, expected to drop end of this week), to better accommodate for contributions like this, because we are getting a lot.

If you need help turning it into a plugin, please ping @BillSchumacher on the discord server. :)

Pwuts avatar Apr 18 '23 10:04 Pwuts

@Pwuts I understand that plugin support is a priority, and I appreciate your help in accommodating contributions like mine.

In the end it is a decision between implementing the email sending feature as a plugin or built-in. A point can be made that sending emails is a fundamental functionality that could potentially benefit a wide range of users. Moreover, since this feature relies solely on core libraries, it doesn't introduce any additional dependencies (see also files changed).

In any case I am open to exploring the plugin system and will get in touch with @BillSchumacher on the Discord server.

riensen avatar Apr 18 '23 12:04 riensen

Thanks for understanding! In our current vision, e-mail is not essential/fundamental functionality, even though it isn't a very code-heavy feature.

Closing the PR for now, hoping to see it return as a plugin. :)

Pwuts avatar Apr 18 '23 15:04 Pwuts

This is just making it too easy for the spammers...

We crossed the line of being worried about things like that when we decided to make an AGI. Though OpenAI usage policies do state that "Automated systems (including conversational AI and chatbots) must disclose to users that they are interacting with an AI system." I don't know exactly how that applies here, but it may be worth adding an Auto-GPT disclaimer to the end of any communications sent.

One notable use of email is that every science paper has the email of at least one author listed, as that is their primary means of correspondence with parties interested in their work. This doesn't make email essential, but if Auto-GPT gets the ability to browse research (#2547) then I'll be interested to see if it makes any attempt to communicate with authors while doing so.

zachary-kaelan avatar Apr 19 '23 17:04 zachary-kaelan

Plugin support just merged to master. (Note: subject to change until v0.3.0 release)

Pwuts avatar Apr 20 '23 00:04 Pwuts

I am excited to share that I have successfully developed the email writing feature as a plugin for Auto-GPT. You can find the plugin on GitHub at the following link:

https://github.com/riensen/Auto-GPT-Email-Plugin

The plugin is fully functional and offers capabilities for both checking and sending emails. I encourage you to try it out and provide any feedback you may have.

I'm looking forward to hearing your thoughts and continuing to contribute to the Auto-GPT project. @BillSchumacher @Pwuts

riensen avatar Apr 20 '23 08:04 riensen