LibreOffice Logo LibreOffice Logo Extensions, Documentation and Templates repository

logo localwriter

A LibreOffice Writer extension that adds local-inference generative AI features.

★ ★ ★ ★ ☆
Extensions Writer
Download latest

latest release: 2024-09-24 04:57:04

Description

localwriter: A LibreOffice Writer extension for local generative AI

Consider donating to support development: https://ko-fi.com/johnbalis

About

This is a libreoffice writer extension to allow for inline generative editing with local inference. It can be used with any language model supported by text-generation-webui.

This extension adds two powerful commands to libreoffice writer:

Extend Selection

Uses a language model to predict what comes after the selected text. There are a lot of ways to use this.

Some example use cases for this include, writing a story or an email given a particular prompt, adding additional possible items to a grocery list, or summarizing the selected text.

Edit Selection

A dialog box appears to prompt the user for instructions about how to edit the selected text, then the selected text is replaced by the edited text.

Some examples for use cases for this include changing the tone of an email, translating text to a different language, and semantically editing a scene in a story.

Setup

First go to tags, and download the most recent version of localwriter.oxt.

In libreoffice, Navigate to Tools, then Extensions Manager, then click Add and find the localwriter.oxt file in your filesystem. You will be directed to read the license then the extension should be installed.

You will also need to setup text-generation-webui, and enable the local openai API (note that this just means in this mode text-generation-webui will respond in the same format as open AI, all the computation still happens on your computer!). You can use whatever model you want, but I'd recommend openchat3.5 if you don't have a particular model in mind and have only 8 gigabytes of VRAM. Once the OpenAI-style API is running on localhost port 5000, localwriter should work with no additional steps. If you are using Ollama as a backend, you need to specify the model you are using in the settings.

Hotkeys

Extend Selection is bound to ctrl + q by default, and Edit Selection is bound to ctrl + e by default.

License

(See License.txt for the full license text)

Except where otherwise noted in source code, this software is provided with a MPL 2.0 license.

The code not released with an MPL2.0 license is released under the following terms. License: Creative Commons Attribution-ShareAlike 3.0 Unported License, License: The Document Foundation https://creativecommons.org/licenses/by-sa/3.0/

A large amount of code is derived from the following MPL2.0 licensed code from the Document Foundation https://gerrit.libreoffice.org/c/core/+/159938

MPL2.0

Copyright (c) 2024 John Balis

Homepage: https://github.com/balisujohn/localwriter

Repository: https://github.com/balisujohn/localwriter

Release Description Compatibility Operating Systems License Release notes Updated  
v0.0.5 Adds max token counts and system prompts to settings. 5.0 Linux, Windows, macOS MPL v0.0.5 Release Notes

ExtendSelection and EditSelection now can have max tokens to generate specified individually in settings.
ExtendSelection and EditSelection now can have system prompt specified individually in settings.
2024-09-24 04:40:14 Download
v0.0.4 Fixes ExtendSelection and EditSelection for text inside of tables. Adds the localwriter logo to the oxt file. 5.0 Linux, Windows, macOS MPL # v0.0.4 Release Notes

* `ExtendSelection` and `Edit Selection` now work on text inside tables.
* The localwriter oxt file now has a logo!
2024-09-02 23:53:05 Download
v0.0.3 Adds an optional model setting (required for Ollama). A model key is only added to request if model is set to a nonempty string 5.0 Linux, Windows, macOS MPL v0.0.3 Release Notes

Adds an optional model setting (required for Ollama). A model key is only added to request if model is set to a nonempty string.
2024-08-01 23:48:29 Download

Related Extensions

odm2pdf4CLI

Logo for odm2pdf4CLI

odm2pdf4CLI is a command-line macro to create PDF files from LibreOffice Writer ODM master files.This is a workaround for a buggy command-line --convert option behavior.

12-2024

222

Not rated yet

VBA Expressions

Logo for VBA Expressions

VBA Expressions is a powerful string expression evaluator for LO Basic, providing the user with more than 100 mathematical, statistical, financial, date-time, logical and text manipulation functions, with support for variables and arrays.

12-2024

6687

★ ★ ★ ★ ★

GigaChat plugin(Individual)

Logo for GigaChat plugin(Individual)

The GigaChat plugin, is an innovative tool leveraging neural network technology to effectively execute user requests. This cutting-edge plugin utilizes advanced AI algorithms to fulfill a wide range of user needs and interactions, providing effic

04-2024

327

★ ☆ ☆ ☆ ☆

APA version 7 template

Logo for APA version 7 template

An APA 7 template for reports a complex version.

06-2024

1021

Not rated yet

GigaChat plugin(Enterprise)

Logo for GigaChat plugin(Enterprise)

The GigaChat plugin, is an innovative tool leveraging neural network technology to effectively execute user requests. This cutting-edge plugin utilizes advanced AI algorithms to fulfill a wide range of user needs and interactions, providing effic

04-2024

973

Not rated yet

Thai Thesaurus

Logo for Thai Thesaurus

This Thai thesaurus provides Thai synonyms data generated from the dataset of PyThaiNLP thai-synonym project.

04-2024

274

★ ★ ★ ★ ★

Feedback

★ ★ ★ ★ ☆

Post your review

You cannot post reviews until you have logged in. Login Here.

Reviews

  • Marty Friedrich Sep 12, 2024, 6:55 AM (4 months ago)

    ★ ★ ★ ★ ☆

    A really great addon! The option to use streaming for quicker responses would be great though.
    (Using ollama)

    • John Balis Sep 24, 2024, 4:43 AM (4 months ago)

      In the newest release (On Github, pending release here) You can set the max tokens per generation in settings. If you set it to a very small number, you can get something pretty similar to streaming. I am considering adding actual streaming.

RSS feed for reviews on this page | RSS feed for all reviews