Corrects grammar mistakes in your draft email, powered by AI.
Upon clicking the new "Grammar" button, sends your draft email to the Llama3 large language model to rewrite it. The draft email text is replaced with the output. You can always undo the change with "Undo" / Ctrl-Z.
Privacy: local server: all your emails stay with you and are not uploaded anywhere! Ollama must first be installed locally. Installation instructions are in the extensions "Preferences" tab, and in the options.html file here.
Malleable: Editable prompt for the LLM: You can make this add-on do different tasks.
.. image:: https://github.com/JohannesBuchner/thunderbird-ai-grammar-mailextension/raw/main/doc/run.gif :alt: Example of usage of this extension :target: https://github.com/JohannesBuchner/thunderbird-ai-grammar-mailextension/raw/main/doc/run.webm
Easiest is to download from the official thunderbird add-ons page: https://addons.thunderbird.net/addon/ai-grammar/ Otherwise go down to "Help contributing" for manual installation.
Go into the add-ons manager, find "AI Grammar" and click on "Preferences".
These installation instructions are provided on a best-effort basis. If they do not work or are outdated, please do not complain here but look up the official instructions and ask for help there. Suggestions for improved instructions are welcome!
To get the Ollama large language model server:
Install Docker (search online for "docker install " + Windows, MacOS or Linux to find install instructions).
Run the Ollama docker image, instructions are on the Ollama github <https://hub.docker.com/r/ollama/ollama>
_. For me on Linux, I ran::
docker run -d -v ollama:/root/.ollama -p 11434:11434 -e 'OLLAMA_ORIGINS=moz-extension://*' --name ollama ollama/ollama
this stackoverflow question <https://stackoverflow.com/questions/48957195/how-to-fix-docker-got-permission-denied-issue>
_If you later want to stop and shutdown the server::
docker stop ollama docker rm ollama
Pull llama3 LLM:
Go to the thunderbird add-ons panel, find "AI Grammar" and go to the "Preferences" tab
Set server url above to http://localhost:11434/ and press test.
Compose an email and press the Grammar button. Should look like the demo above!
Contributions are more than welcome and encouraged in the form of pull requests.
It is not too hard to create your own modified extension to suit your workflow!
Useful resources:
Manual installation (allows modifying the extension):
Download this repository folder as a zip <https://github.com/JohannesBuchner/thunderbird-ai-grammar-mailextension/archive/refs/heads/main.zip>
_ and extract it into a folder.
Alternatively, get a full copy of the code repository with::
git clone https://github.com/JohannesBuchner/thunderbird-ai-grammar-mailextension`
follow instructions on https://developer.thunderbird.net/add-ons/hello-world-add-on to select and load manifest.json as a temporary extension.
.. image:: https://github.com/JohannesBuchner/thunderbird-ai-grammar-mailextension/raw/main/doc/debug-install.gif :alt: Example of usage of this extension :target: https://github.com/JohannesBuchner/thunderbird-ai-grammar-mailextension/raw/main/doc/debug-install.webm
Go to the thunderbird add-ons panel, find "AI Grammar" and go to the "Preferences" tab
Set server url above to http://localhost:11434/ and press test.
Compose an email and press the Grammar button. Should look like the demo above! A test text::
She seeks sea shells near a nearest shore. Frank falls down trees.
but here we has a bad quotie which does not make any senses. This should please kindly friendlyly be ignored. Thanks yous.
Once I went always to the train station to pick up a friend. Then we walked back home.
--
well laddie what says you? are we do good things? This signature will not be checked.
Apache 2.0 license.
Created by Johannes Buchner based on https://github.com/raulpardo/thunderbird-langtool-mailextension/