Console commands

The extension provides the following console commands:

solver:solve

Next to the exception handler integration, one can also explicitly solve problems using the provided console command solver:solve.

vendor/bin/typo3 solver:solve [<problem>] [options]

Problems can be solved in two ways on the command line:

  1. Pass the problem (= exception message) and additional metadata such as exception code, file and line. By using this way, EXT:solver will create a dummy exception and pass it to the solution provider.

  2. Pass an exception cache identifier to solve a cached exception. This way is more accurate as it restores the original exception and passes it to the solution provider.

Tip

You can find the exception cache identifier on exception pages. It is assigned as data-exception-id attribute to the solution container element.

Note

This command is not schedulable.

The following input parameters are available:

problem
Required

false

Type

string

Default

none

The exception message to solve.

Note

You must either pass the problem argument or --identifier option.

Example:

vendor/bin/typo3 solver:solve "No TypoScript record found!"
-i|--identifier
Required

false

Type

string

Default

none

An alternative cache identifier to load an exception from cache.

Note

You must either pass the problem argument or --identifier option.

Example:

vendor/bin/typo3 solver:solve -i c98d277467ab5da857483dff2b1d267d36c0c24a
-c|--code
Required

false

Type

integer

Default

none

Optional exception code.

Note

This option is only respected in combination with the problem argument.

Example:

vendor/bin/typo3 solver:solve "No TypoScript record found!" -c 1294587218
-f|--file
Required

false

Type

string

Default

none

Optional file where the exception occurs.

Note

This option is only respected in combination with the problem argument.

Example:

vendor/bin/typo3 solver:solve "No TypoScript record found!" -f /var/www/html/vendor/typo3/cms-frontend/Classes/Controller/TypoScriptFrontendController.php
-l|--line
Required

false

Type

integer

Default

none

Optional line number within the given file.

Note

This option is only respected in combination with the problem argument.

Example:

vendor/bin/typo3 solver:solve "No TypoScript record found!" -l 1190
-r|--refresh
Required

false

Type

boolean

Default

false

Refresh a cached solution (removes the cached solution and requests a new solution).

Example:

vendor/bin/typo3 solver:solve "No TypoScript record found!" --refresh
-j|--json
Required

false

Type

boolean

Default

false

Print solution as JSON.

Example:

vendor/bin/typo3 solver:solve "No TypoScript record found!" --json

solver:list-models

The command solver:list-models can be used to list available OpenAI models for the configured OpenAI API key. By default, the command lists only GPT models since all other models cannot be used with the extension.

vendor/bin/typo3 solver:list-models [options]

Note

EXT:solver uses the chat completion component to generate solutions. You must select a model being available with the chat completion component only.

All available models are also listed in the OpenAI documentation.

Note

This command is not schedulable.

The following input parameters are available:

-a|--all
Required

false

Type

boolean

Default

false

List all available models rather than only GPT models.

Note

Only GPT models can be used with the extension.

Example:

vendor/bin/typo3 solver:list-models --all

solver:cache:flush

Every solution is cached to reduce the amount of requests sent by the OpenAI client. In order to flush the solution cache or remove single cache entries, the command solver:cache:flush can be used.

vendor/bin/typo3 solver:cache:flush [<identifier>]

The following input parameters are available:

identifier
Required

false

Type

string

Default

none

An optional cache identifier to remove only a single cached solution. This is especially helpful to require a new solution for a specific problem while keeping other solutions cached.

Tip

The cache identifier can be found on the error page next to the used OpenAI model. Hover over the cache date to make it visible.

Example:

vendor/bin/typo3 solver:cache:flush 65e89b311899aa4728a4c1bced1d6f6335674422