PHPackages                             konradmichalik/typo3-natural-language-query - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. konradmichalik/typo3-natural-language-query

ActiveTypo3-cms-extension

konradmichalik/typo3-natural-language-query
===========================================

This extension provides a natural language query interface for TYPO3 records.

02PHP

Since Mar 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/jackd248/typo3-natural-language-query)[ Packagist](https://packagist.org/packages/konradmichalik/typo3-natural-language-query)[ RSS](/packages/konradmichalik-typo3-natural-language-query/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Extension icon](Resources/Public/Icons/Extension.svg)](Resources/Public/Icons/Extension.svg)

TYPO3 extension `typo3_natural_language_query`
==============================================

[](#typo3-extension-typo3_natural_language_query)

This extension provides a natural language query interface for TYPO3 records.

Note

This extension is meant to be a proof of concept for prompt engineering and query building using OpenAI. You should probably not use this in production

[![Screencast](./Documentation/Images/screencast.gif)](./Documentation/Images/screencast.gif)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require konradmichalik/typo3-natural-language-query
```

Configuration
-------------

[](#configuration)

The following configuration options are available:

### API

[](#api)

- `key`: OpenAI API key. Must be created on .
- `model`: The model to use for the query. See . (Default: `gpt-3.5-turbo-instruct`)

### Database

[](#database)

- `strict_mode`: In strict mode, an exception will be thrown if the query attempts to perform a write or alter operation on the database. (Default: `true`)
- `connection`: The name of the database connection to use. Depending on your needs, you may want to restrict the database user to read-only access. (Default: `Default`)
- `ignore_tables`: A comma separated list of tables (supporting wildcards) to ignore when querying the database. (Default: `sys_*, cache_*, cf_*`)
- `ignore_fields`: A comma separated list of fields to ignore when querying the database. (Default: `password`)

Console command
---------------

[](#console-command)

Use the console command to ask a natural langauge question for querying records.

```
vendor/bin/typo3 nlq:ask "How many pages are available in the page tree?"
```

[![Console Command](./Documentation/Images/command.png)](./Documentation/Images/command.png)

Use the `-v` verbose option to get more information about the query process.

```
vendor/bin/typo3 nlq:ask "How many pages are available in the page tree?" -v
```

[![Console Command](./Documentation/Images/command-verbose.png)](./Documentation/Images/command-verbose.png)

Service
-------

[](#service)

You can also use the `Solver` service to solve natural language queries in your own code.

```
