Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development of Email Drafting Feature Using Ollama API (latter OpenAI API) for GroupOffice Integration #1127

Open
deependhulla opened this issue Feb 28, 2024 · 5 comments

Comments

@deependhulla
Copy link

Dear Merijn Schering,

I have been utilizing ChatGPT for some time and am now using Ollama on an offline server with the tinyllama module for generating email replies, which I plan to incorporate into GroupOffice mail. I am considering developing a feature akin to Gmail's "Smart Compose/help write" which drafts emails based on a few inputs, by leveraging the Ollama API. I intend to contribute the code to your project.

I have begun reviewing your developer documentation available at https://groupoffice.readthedocs.io/en/latest/developer/index.html. However, I believe I might benefit from your guidance to expedite the exploration of this concept. Your advice would be invaluable in enabling me to start development and create a module for this purpose.

Here are my specific inquiries:

I aim to familiarize myself with the structure and development process of modules in GroupOffice and understand how modules can extend its functionality.
I plan to review the GroupOffice developer documentation in detail, focusing on guidelines for module creation, hooks, and email functionality interaction.
For example, identifying the appropriate location to integrate an "Email Responder" button within the email module. Upon clicking, a dialog box should appear, offering various reply options, including a textbox for custom responses.
After selecting "generate," the complete EML of the opened email should be sent to the backend for processing by my code API with security measures in place. My PHP code would then interact with the Ollama API to generate two or three response options. Upon the user's selection, the chosen response would be inserted into the email body at the cursor's location.

Your insights could significantly accelerate my development process. I am inclined to develop this as a module rather than modifying the original code. I look forward to hearing your thoughts on this approach.

-Deepen Dhulla

@lonesomewalker
Copy link

Maybe it is better to not scramble this with GO.
If you REALLY need help with writing emails or email drafts, you can do that externally and then do it vice versa (or even send it directly from Ollama).

And sooner or later you will also realize: machine learning was a waste of time/energy. Wait for it :-)

@deependhulla
Copy link
Author

Hi,

I do not wish to struggle with integrating GO, which is why I am seeking your advice for tips and tricks. Additionally, I've been using Ollama manually for personal purposes and am considering offering the same functionality within GO for others. Despite a nornmal view that machine learning often represents a significant investment of time and energy without substantial benefits, in this case of Ollama with the TinyLlama, Llama2, Phi-2 model, the major machine learning development work has already been completed. It's now a matter of integration with chat-api. I would appreciate any insights you can provide on these points, I raised earlier.

By the way, thank you for the wonderful Group-Office. Although I am not a paying customer, I have been using your community edition for years and recommending it to others as part of an open-source email solution deployment.

@mschering
Copy link
Member

Hi,

lonesomewalker does not speak for Intermesh. It's not up to us to decide what is useful functionality for you. It's perfectly fine to ask for guidance on how to write a plugin module for the e-mail module here.

What I would do is write a module that overrides the GO.email.EmailComposer. You can find a perfect example in the smime module here:

https://github.com/Intermesh/groupoffice/blob/15c55886ef5ff6efcaf05391175e2f57d87c0bd5/www/modules/smime/PluginEmailComposer.js

Good luck,
Merijn

@deependhulla
Copy link
Author

Thank you, Merijn. I will surely check it out, hoping for the best.

@derjoachim
Copy link
Contributor

Obligatory link to our documentation page on overriding existing modules. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants