WarmSaluters / mailmerge-js

AI-powered Gmail Automation CLI
https://www.mailmerge-js.dev/
MIT License
22 stars 3 forks source link

Error & Contribution discussion #7

Open monikkacha opened 3 months ago

monikkacha commented 3 months ago

Hello, @charlesyu108 @ryanhuang519,

I came across your project through a Reddit post this morning and was impressed by the concept of templating emails using the Gmail API. βœ‰οΈ

I am a software engineer with 5 years of experience and would like to contribute to the project. πŸ‘¨β€πŸ’»

The project caught my interest, so I tried following the steps in the README.md. However, I encountered an error related to ChatGPT-4.0. It appears that the mail merge feature requires ChatGPT-4.0, but I currently don't have access to it. Despite knowing it's free, it hasn’t been activated on any of my accounts. Upon examining the code, I found the requestLLM method in the openai.ts file. Based on its parameters, it seems possible to pass a different ChatGPT model, though this is not documented in the README.md. πŸ› οΈ

Additionally, I have identified several areas for improvement:

I refrained from raising a direct PR for these improvements because I believe you may have specific plans or pending features you wish to implement. I would be delighted to assist with these or any other aspects of the project, as I am eager to contribute to an open-source project and enhance my coding skills. πŸ’ͺ

Please let me know how to proceed or if there is a Discord channel where we can discuss future plans. πŸ—¨οΈ

image
charlesyu108 commented 3 months ago

Hey monikkacha!

Love to hear the enthusiasm! Consider yourself onboard.

Will address a few things here.

RE: Discord We are still really small and this project hasn't proven the need for discord just yet. Let's communicate over github discussion in threads like this until it doesn't scale (i.e. 5+ regular devs)

RE: Improvements I like the ideas you've proposed! Feel free to open a PR with those and I'll take a look.

Finally, another PR or starter contribution could be to update the default model from "gpt-4o" to a more accessible one and/or add a better help message than the error you encountered. I think "gpt-4-turbo" is more accessible with similar performance

Looking forward to working together :^)

monikkacha commented 3 months ago

@charlesyu108 Glad to hear from you

Ok, i am starting working on fixing contribution.md link for npmjs package and will raise PR

monikkacha commented 3 months ago

I have discovered a method to pass ChatGPT 3.5 to the CLI, but it results in a "limit reached" error due to insufficient credits in my OpenAI account. Based on my understanding of this project, we are currently using ChatGPT to replace variables with values in a template. This usage restricts the tool to users with a ChatGPT membership. However, for this straightforward use case, we can consider alternative methods.

Please share your thoughts.

charlesyu108 commented 3 months ago

Hey @monikkacha.

Yes, that makes sense to add an non-AI version.

To explain some of the thinking, there are many email templating tools that exist today that use Jinja/Nunchucks type templating frameworks to do mail merge. We thought given how affordable Chat-GPT has gotten, it would be great to have an LLM bascially act as the template engine. That way you wouldnt have to strictly write templates against your data and could have more expressibility in the template. Hence the motivation for this project.

That said, I think having a non-AI version would be great too if you'd like to take that on or I can add it later. Assuming the template engine is jinja, would think the pattern would be --model jinja and we have different Model/Engine abstractions internally.

monikkacha commented 3 months ago

Hello @charlesyu108

I would like to add a template engine to the project but don't have much idea how it works and will be occupied for a while, so we can add it later.

charlesyu108 commented 3 months ago

@monikkacha Cool no worries, I just opened this issue to document: https://github.com/WarmSaluters/mailmerge-js/issues/9

charlesyu108 commented 3 months ago

Hey @monikkacha. Not sure if you saw but I added some changes last week that make the necessary abstractions for supporting different types of renderers in case you are still interested in taking on the non-AI template engine:

https://github.com/WarmSaluters/mailmerge-js/pull/10

I also added support for using local LLMs circumventing the need for an OpenAI key

monikkacha commented 3 months ago

Hey @charlesyu108 Thanks for the update .

I was super busy in last couple of days, still have work at my full day job, will be free by weekend, i will take a look and update you regrading .

charlesyu108 commented 3 months ago

@monikkacha Hey no worries! No rush and we don't have timelines. Just wanted to let you know since you expressed interest in this project.

charlesyu108 commented 2 months ago

Thanks for the work on #9 @monikkacha! Just published your changes and should be available through npm latest @ version 1.0.22

monikkacha commented 2 months ago

My pleasure, took updated npm package, it works as expected with nunjucks.

I will play around with this package a little more, meanwhile if you have some feature in mind to add or working on some other interesting project , i would be happy to contribute πŸ˜„ .

charlesyu108 commented 2 months ago

Hey @thecodingman247! I'm assuming you're also monik? Sorry to hear about the layoff :/ unfortunately i don't have any leads right now but i wish you the best of luck in your job search. Maybe you can use this email tool to fire off messages to recruiters?

monikkacha commented 2 months ago

@charlesyu108 Thanks for the quick update !