Artificial Intelligence is a powerful tool that can do plenty of good things if used correctly and responsibly. AI-based chatbots are trained to assist you in content writing, image generation, data processing, programming, information analysis, etc., making it easier for you to perform various routine tasks.
Taking into consideration the endless capabilities of AI tools becoming more and more powerful every day, it is a good idea to combine them with software programs. When integrated into an application, artificial intelligence provides a better user experience, increases productivity, and offers access to new features.
In this article, you will learn how to enable AI-powered document editing on Ubuntu through the example of ONLYOFFICE Desktop Editors, an open-source office package for Linux, and GPT4All, an open-source platform designed to run local AI models.
The main advantage of this integration is that you can use any large language model provided by GPT4All and its capabilities right in your document, without having to launch the platform itself.
Step 1. Install GPT4All on Ubuntu
GPT4All is a free and open-source platform designed to respect data privacy while running AI models locally, without access to the Internet.
The platform is compatible with various CPUs and GPUs and provides access to more than 1000 open-source large language models (LLM), including Llama, Mistral and more.
On Ubuntu, the easiest way to install and run GPT4All is using the official installer that you can download from the GPT4All website. After downloading the installer, you just need to run it and follow the instructions provided by the installation wizard.
Please note that you might need to make the installer executable first by ticking the corresponding option in its properties.
The installation process usually takes a few minutes. When it’s over, click the Finish button.
Step 2. Run GPT4All and Download an AI Model
Now that you have GPT4All installed on your Ubuntu, it’s time to launch it and download one of the available LLMs.
To do so, run the platform from the gpt4all
folder on your device. When launching it for the first time, you will be offered to take part in anonymous usage analytics. If you don’t want to, just choose No.
After that, go to the Models section and choose the one you would like to run locally. Please note that some AI models have high RAM requirements and might need you to have an API key.
If a model needs an API key, you can get it from the corresponding AI provider. In some cases, it’s not for free so you need to choose wisely.
Select what you like and click the Download button, which will download the selected LLM to your device.
Finally, when your LLM is ready for local usage, go to the Settings section and activate the Enable Local API Server option. This option is required for successful integration with ONLYOFFICE Desktop Editors. Also, you should remember the API Server Port.
When the settings are configured, you can proceed with the next step.
Step 3. Install ONLYOFFICE Desktop Editors
Now you need to get ONLYOFFICE Desktop Editors installed on your device, which is an open-source office suite is a great alternative to Microsoft Office for Linux users because it’s fully compatible with Word, Excel, and PowerPoint files, and also has a built-in PDF editor.
This makes ONLYOFFICE Desktop Editors a versatile office package that is capable of dealing with all popular office files, including fillable PDF forms.
The ONLYOFFICE app can be installed on Ubuntu in different ways. Please refer to this Install ONLYOFFICE Desktop Editors in Linux guide to choose what works best for you.
Step 4. Install the AI Plugin in ONLYOFFICE Desktop Editors
To get started with artificial intelligence in ONLYOFFICE Desktop Editors, you should install a special plugin that enables various AI models in the app.
Launch the program and create a new text document or upload one from your device. After that, go to the Plugins tab and launch the Plugin Manager. You will instantly see the AI plugin. Click the Install button.
The AI plugin in ONLYOFFICE is a background plugin so you need to activate it after installation. Get back to the Plugins tab and click the Background plugins option.
You will see all available plugins of this type, and all you need to do is to enable the AI plugin. If done correctly, a new AI tab will appear next to the Plugins tab.
Step 5. Add and Configure the AI Model from GPT4All
After installing and activating the AI plugin, everything is ready for adding and configuring the AI model from GPT4All. To do so, access the AI tab and open the Settings menu. Using this menu, you can add and manage all LLMs available in ONLYOFFICE Desktop Editors.
Use the Add option to add a new model. In the Name field, you will see a list of default AI providers, including GPT4All. Choose this option from the list, and the corresponding model’s name and the URL parameter will be added automatically.
In our case, the URL is http://localhost:4891
, where port 4891
corresponds to the API Server Port value from GPT4All settings described in Step 2 in this guide.
If all the parameters are correct, click OK. The configuration process is finished, and you can start using the selected AI model in ONLYOFFICE Desktop Editors.
Step 6. Start Using the AI Model In ONLYOFFICE
Now that the AI plugin is configured properly, and the AI model has been added successfully, you have the total freedom to use the selected LLM while working on text documents, spreadsheets, presentations, forms and PDF files.
Interestingly, the AI plugin in ONLYOFFICE Desktop Editors supports multiple AI models, you can add several LLMs and use them for different tasks via the AI configuration window.
Using the Ask AI option on the AI tab, you can directly interact with the chatbot and send your request to it. Since you are using a model added via GPT4All, all your requests are processed locally, and you don’t need to have an Internet connection.
Please note that request processing might take some time because it depends on the performance of your device.
Alternatively, you can make the chatbot perform various text-related tasks via the context menu. Here is a quick overview of what you can do in ONLYOFFICE Desktop Editors using LLMs provided by GPT4All:
- Generate new text content and rewrite the existing one according to your needs.
- Improve your writing skills by finding synonyms and correcting spelling/grammar mistakes.
- Summarize large volumes of text information.
- Extract keywords for SEO purposes.
- Find the answers to your questions.
- Translate and more.
Conclusion
The integration of AI tools offered by GPT4All into ONLYOFFICE Desktop Editors allows you to increase your productivity when working on office files since you can delegate your routine tasks, like spell-checking and translation, to the integrated AI chatbot and use it as a personal writing assistant.
The biggest advantage is that you have the opportunity to choose any AI model you like and try various models to make sure your work is done correctly.