.. include:: /Includes.rst.txt .. _installation: ============ Installation ============ .. _quickstart: Quick start =========== The recommended way to install this extension is via Composer: .. code-block:: bash :caption: Install via Composer composer require netresearch/nr-llm After installation: 1. Activate the extension in :guilabel:`Admin Tools > Extension Manager`. 2. Configure providers and API keys in :guilabel:`Admin Tools > LLM > Providers`. 3. Define available models in :guilabel:`Admin Tools > LLM > Models`. 4. Create configurations in :guilabel:`Admin Tools > LLM > Configurations`. 5. Clear caches. .. _installation-composer: Composer installation ===================== .. _installation-requirements: Requirements ------------ Ensure your system meets these requirements: - PHP 8.2 or higher. - TYPO3 v13.4 LTS or v14.3 LTS. - Composer 2.x. - :composer:`netresearch/nr-vault` ^0.14.0 (required for API key encryption; installed automatically via Composer). .. _installation-steps: Installation steps ------------------ 1. **Add the package** .. code-block:: bash :caption: Install via Composer composer require netresearch/nr-llm 2. **Activate the extension** Navigate to :guilabel:`Admin Tools > Extension Manager` and activate :t3ext:`nr_llm`. 3. **Configure API keys** Use the setup wizard at :guilabel:`Admin Tools > LLM > Setup Wizard` to auto-detect your provider and discover models. .. figure:: /Images/backend-setup-wizard.png :alt: LLM setup wizard :class: with-border with-shadow :zoom: lightbox The setup wizard guides you through provider connection, model discovery, and configuration. .. tip:: Not sure which provider you need? :guilabel:`Admin Tools > LLM > Get Started` asks what you want to do first — editorial assistance, translation, metadata, media accessibility, agent workflows, developer integration — and can install a use-case pack for it: a configuration, tasks and prompt snippets, created only after you confirm the list. The *Editorial Starter* pack is the one currently shipped. The setup wizard stays the technical route and is linked from every screen there. The plan you confirm also states the three things an install changes that are not new records: the snippet tags it adds to the pack's own configuration, any existing configuration that already selects one of those tags and would therefore compose the pack's snippets into its prompts too, and any existing snippet carrying one of those tags, which the added tags compose into the pack's configuration. See :ref:`administration-usecase-packs`. See :ref:`configuration` for detailed setup instructions. 4. **Clear caches** .. code-block:: bash :caption: Flush all caches vendor/bin/typo3 cache:flush .. _installation-manual: Manual installation =================== If you cannot use Composer: 1. Download the extension from the TYPO3 Extension Repository (TER). 2. Extract to :path:`typo3conf/ext/nr_llm`. 3. Activate in :guilabel:`Admin Tools > Extension Manager`. 4. Configure API keys and settings. .. warning:: Manual installation requires manual dependency management. Composer installation is strongly recommended. .. _installation-database: Database setup ============== The extension creates the following database tables automatically: .. list-table:: :header-rows: 1 :widths: 30 70 * - Table - Purpose * - :sql:`tx_nrllm_provider` - Stores API provider connections with encrypted credentials. * - :sql:`tx_nrllm_model` - Stores available LLM models with capabilities and pricing. * - :sql:`tx_nrllm_configuration` - Stores use-case-specific configurations with prompts and parameters. * - :sql:`tx_nrllm_task` - Stores one-shot prompt tasks for common operations. * - :sql:`tx_nrllm_prompttemplate` - Stores reusable prompt templates with versioning and performance tracking. * - :sql:`tx_nrllm_service_usage` - Tracks specialized service usage (translation, speech, image). Run the database compare tool after installation: .. code-block:: bash :caption: Set up extension database tables vendor/bin/typo3 extension:setup nr_llm .. _installation-cache: Cache configuration =================== The extension uses TYPO3's caching framework. Cache configuration is set up automatically — **no backend is hardcoded**. TYPO3 uses your instance's default cache backend, so Redis, Valkey, or Memcached work transparently if configured. To override the cache backend specifically for nr-llm: .. code-block:: php :caption: config/system/additional.php use TYPO3\CMS\Core\Cache\Backend\RedisBackend; $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching'] ['cacheConfigurations']['nrllm_responses'] ['backend'] = RedisBackend::class; .. _installation-upgrading: Upgrading ========= .. _installation-upgrading-previous: From previous versions ---------------------- 1. **Backup your database** before upgrading. 2. Run Composer update: .. code-block:: bash :caption: Update the extension composer update netresearch/nr-llm 3. Run database migrations: .. code-block:: bash :caption: Update database schema vendor/bin/typo3 database:updateschema 4. Clear all caches: .. code-block:: bash :caption: Flush all caches vendor/bin/typo3 cache:flush .. _installation-breaking-changes: Breaking changes ---------------- Check the :ref:`changelog` for breaking changes between versions. .. _installation-uninstall: Uninstallation ============== To remove the extension: 1. Deactivate in :guilabel:`Admin Tools > Extension Manager`. 2. Remove via Composer: .. code-block:: bash :caption: Remove the extension composer remove netresearch/nr-llm 3. Clean up database tables if desired: .. code-block:: sql :caption: Drop extension database tables DROP TABLE IF EXISTS tx_nrllm_provider; DROP TABLE IF EXISTS tx_nrllm_model; DROP TABLE IF EXISTS tx_nrllm_configuration; DROP TABLE IF EXISTS tx_nrllm_configuration_begroups_mm; DROP TABLE IF EXISTS tx_nrllm_task; DROP TABLE IF EXISTS tx_nrllm_prompttemplate; DROP TABLE IF EXISTS tx_nrllm_service_usage; 4. Remove any TypoScript includes referencing the extension.