Welcome to Download LibreOffice 07/25/2026 05:10pm

ChatGPT in LibreOffice: Harnessing AI for Enhanced Writing in Writer

ChatGPT in LibreOffice: AI at the Service of Writer

Transforming Your Writing Experience

Artificial intelligence is rapidly changing the way we write, edit, and summarize documents. However, many users prefer to stick to their routines in LibreOffice Writer. They do not want to copy each piece of text into a browser. The AI Assistant for Writer extension precisely addresses this need.

Seamless Integration of AI Features

This extension adds artificial intelligence capabilities directly to LibreOffice Writer. With it, you can edit, rephrase, or summarize text without leaving your document. The tool works with OpenAI, as well as with Ollama for local usage.

Get Started with AI Assistant for Writer

You can download AI Assistant for Writer for free in OXT format. The installation is straightforward and does not require any complex modifications to LibreOffice.

Why Use ChatGPT in LibreOffice Writer?

LibreOffice Writer already offers a number of features for creating and formatting documents. However, its traditional spell checker cannot rephrase a sentence or summarize a long passage. Therefore, artificial intelligence provides complementary assistance.

AI Assistant for Writer analyzes the text you select. Then, the extension transmits this passage to the configured AI provider. Finally, it displays the result before any modification of the document.

This confirmation step is important. In fact, artificial intelligence can sometimes misinterpret a nuance or incorrectly interpret a sentence. Therefore, you always retain control over the final text.

The extension offers three main commands:

  • Correct spelling, grammar, punctuation, and syntax;
  • Rephrase a passage while maintaining its general meaning;
  • Summarize a text to extract essential ideas.

These functions meet the most common needs. Therefore, they are suitable for individuals, students, teachers, and professionals.

A User-Friendly LibreOffice Extension

AI Assistant for Writer integrates into the context menu of LibreOffice Writer. Therefore, you do not need to learn a new interface.

You start by opening a Writer document. Then, you select the passage you wish to improve. A right-click displays the "AI Assistant" submenu.

You then choose the desired action. The extension can correct, rephrase, or summarize the selection. It only sends the selected text to the configured provider.

After a few seconds, a window presents the proposed result. You can then accept the modification or cancel it. Thus, the extension never replaces your content without your consent.

This method also limits errors. You can compare the proposal with the original text before making a decision.

How to Install AI Assistant for Writer?

The installation uses the extension manager built into LibreOffice. Therefore, you do not need to manually copy files into the software's folders.

First, download the latest version from the official extension page. The downloaded file retains its .oxt extension.

Then, open LibreOffice and follow these steps:

  1. Open the "Tools" menu.
  2. Select the extension manager.
  3. Click the "Add" button.
  4. Choose the downloaded OXT file.
  5. Confirm the installation for the current user.
  6. Close LibreOffice completely.
  7. Restart the software.

The extension requires LibreOffice 24.2 or a newer version. It also uses the Python component provided with LibreOffice.

After restarting, open a Writer document. Select some text, then right-click. The AI Assistant submenu should automatically appear.

Using Ollama with LibreOffice for Local AI

Ollama allows you to run an artificial intelligence model on your own computer. Thus, you can use the extension without an OpenAI API key.

This solution is particularly suitable for users who prefer local processing. Indeed, Ollama receives the text directly on your machine. The content does not pass through the OpenAI API.

Your computer must, however, have adequate resources. Performance depends on the processor, memory, and possibly the graphics card.

AI Assistant for Writer uses gemma4:e2b as the default Ollama model. Therefore, you must download this specific model before your first use.

First, install Ollama from its official website. Then, open a terminal and run this command:

ollama pull gemma4:e2b

Ollama will then download the model to your computer. This operation may take several minutes due to the size of the files.

You can then check its presence with this command:

ollama ls

The name gemma4:e2b should appear in the list. If not, the extension will not be able to find the model.

Ollama typically uses the following local address:

http://localhost:11434

The Ollama application must remain active while using the extension. Otherwise, LibreOffice will display a connection error.

Configuring Ollama on Windows

On Windows, you can save the configuration using PowerShell. Open PowerShell, then run the following commands:

[Environment]::SetEnvironmentVariable("LIBREOFFICE_AI_PROVIDER", "ollama", "User")
[Environment]::SetEnvironmentVariable("LIBREOFFICE_AI_OLLAMA_MODEL", "gemma4:e2b", "User")
[Environment]::SetEnvironmentVariable("LIBREOFFICE_AI_OLLAMA_BASE_URL", "http://localhost:11434", "User")

These commands save the settings for your Windows account. However, LibreOffice must be restarted to detect the new variables.

So close all LibreOffice windows. Also, check that quick start is not keeping the program in the background. Then, restart Writer and test a short selection.

Configuring Ollama on Linux or macOS

On Linux or macOS, you can set the variables from a terminal:

export LIBREOFFICE_AI_PROVIDER="ollama"
export LIBREOFFICE_AI_OLLAMA_MODEL="gemma4:e2b"
export LIBREOFFICE_AI_OLLAMA_BASE_URL="http://localhost:11434"

You then need to launch LibreOffice from that same terminal. The program thus receives the necessary variables.

However, these settings disappear when you log out. You can therefore add them to your shell configuration file. The file in question may be .bashrc, .bash_profile, or .zshrc.

This operation depends on your system. Therefore, check the shell used before modifying its configuration.

Using OpenAI and ChatGPT in LibreOffice

The extension can also communicate with the OpenAI API. This option allows you to use an OpenAI model without launching a local model.

The term "ChatGPT in LibreOffice" facilitates understanding of the service. However, the extension does not connect to the ChatGPT site interface. It directly uses the OpenAI API.

Therefore, you must have a valid API key. A ChatGPT subscription does not automatically provide credits for the API. OpenAI manages ChatGPT and its programming interface billing separately.

Create your key from the OpenAI platform. Then, keep it in a safe place. Never insert it into a shared document.

The extension reads the key from the OPENAI_API_KEY variable. It also uses gpt-5-mini as the default OpenAI model.

On Windows, open PowerShell and type:

[Environment]::SetEnvironmentVariable("LIBREOFFICE_AI_PROVIDER", "openai", "User")
[Environment]::SetEnvironmentVariable("OPENAI_API_KEY", "your-api-key", "User")
[Environment]::SetEnvironmentVariable("LIBREOFFICE_AI_OPENAI_MODEL", "gpt-5-mini", "User")

Replace your-api-key with your actual key. Then, completely close LibreOffice and restart Writer.

On Linux or macOS, use these commands instead:

export LIBREOFFICE_AI_PROVIDER="openai"
export OPENAI_API_KEY="your-api-key"
export LIBREOFFICE_AI_OPENAI_MODEL="gpt-5-mini"

Then launch LibreOffice from the same terminal. You can also save these variables in your user profile.

Ollama or OpenAI: Which Solution to Choose?

Both providers give access to the same commands in Writer. However, they do not precisely address the same priorities.

Criteria Ollama OpenAI
Processing On your computer On OpenAI servers
Internet Connection Required to download the model Required for each request
API Key No Yes
Default Model gemma4:e2b gpt-5-mini
Request Costs No direct API cost Possible billing
Local Resources High Low
Installation Ollama and model required API key required
Privacy Local processing with a local model Text sent to OpenAI

Ollama is suitable for those who want to keep their texts on their computer. However, this solution requires more memory and power.

OpenAI reduces local hardware needs. However, the service sends the selected text to an external platform. It may also charge for requests based on the model and volume used.

Your choice thus depends on your priorities. You may prioritize local privacy, simplicity, or speed.

Correcting Text with Artificial Intelligence

The correction command analyzes spelling, grammar, and punctuation. It can also improve certain awkward constructions.

Select only the passage concerned. Then choose "Correct" from the AI Assistant menu. The extension prepares a proposal and asks you to confirm it.

This function is suitable for emails, reports, and articles. It also assists those who write in a language they are still imperfectly familiar with.

However, you must reread the proposal. An AI may modify a technical term or misinterpret a proper noun as an error.

Rephrasing a Passage in LibreOffice Writer

The rephrasing command improves the flow of the text. It seeks to preserve the meaning while offering a different wording.

This function can simplify a complex sentence. It can also make a paragraph clearer or more natural.

For example, a user may rephrase a professional response before sending it. A student can improve a draft. A writer can also eliminate repetitions.

The extension always displays the new text before its insertion. Therefore, you can refuse a rephrasing that alters your intent.

Summarizing a Document with AI

The summarizing function reduces a passage while retaining its main ideas. It is suitable for long texts, notes, and reports.

You control the amount of text sent through your selection. Thus, you can summarize only a section of the document.

This approach is more precise than automatically processing the entire file. It also limits the amount of data transmitted to the provider.

However, the result depends on the quality of the original text. A clear passage generally produces a better summary.

Protecting Your Data in LibreOffice

Confidentiality primarily depends on the provider chosen. With Ollama and a local model, your computer normally processes the data. With OpenAI, the extension transmits the selection to the API.

Therefore, you should avoid sending sensitive information without verifying the applicable rules. This precaution applies to medical, legal, financial, or professional data.

The extension does not automatically transmit the entire document. It only processes the selected passage. Therefore, you directly control the information sent.

With OpenAI, the API key remains in an environment variable. It does not appear in the Writer file. However, you must protect your user account and computer.

Troubleshooting Common Issues

If the AI Assistant menu does not appear, first check the version of LibreOffice. Then, ensure that the extension is listed in the extension manager.

If Ollama does not respond, ensure its service is running. Run ollama ls to check the presence of gemma4:e2b.

If OpenAI rejects the request, check the API key and billing. Also, verify the value of LIBREOFFICE_AI_PROVIDER.

Finally, always restart LibreOffice after modifying variables. The software does not necessarily detect changes while it is running.

Easy Addition of ChatGPT to LibreOffice Writer

AI Assistant for Writer provides concrete help without disrupting your workflow. You remain in Writer and only select the text to process.

Ollama offers a local solution with the gemma4:e2b model. OpenAI provides an online alternative with an API key. Thus, everyone can choose the configuration that suits their needs.

The extension facilitates correction, rephrasing, and summarization. It also maintains a validation step before each replacement.

You can now download AI Assistant for Writer for LibreOffice, install the OXT file, and configure your artificial intelligence provider.