NAME

App::Greple::xlate::llm - common backend for llm-based translation engines

DESCRIPTION

This module provides the shared machinery for translation engines built on the llm command line tool (https://llm.datasette.io/): command construction, JSON request protocol, batching, progress display, and failure diagnosis. Engine modules such as App::Greple::xlate::llm::gpt5 only define the model name, prompt, and model options.

ENGINE REGISTRATION

Engine modules call register_engine(__PACKAGE__, %parameters) to install the initialize and xlate entry points expected by greple. The defaults are the shared translation prompt and a batch size of 3000 characters. Each engine retains its own lang_from, lang_to, and method package variables and advertises context support.

App::Greple::xlate::llm::register_engine(__PACKAGE__,
    model   => 'gpt-6-astra',
    options => [ [ reasoning_effort => 'low' ] ],
);

SEE ALSO

App::Greple::xlate, App::Greple::xlate::llm::gpt5

AUTHOR

Kazumasa Utashiro

LICENSE

Copyright 2026 Kazumasa Utashiro.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.