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]
Copied!
typo3/sysext/core/bin/typo3 solver:solve [<problem>] [options]
Copied!

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.

The following input parameters are available:

problem

problem
Type
string
Required
false
Default
none

The exception message to solve.

Example:

vendor/bin/typo3 solver:solve "No TypoScript record found!"
Copied!
typo3/sysext/core/bin/typo3 solver:solve "No TypoScript record found!"
Copied!

-i|--identifier

-i|--identifier
Type
string
Required
false
Default
none

An alternative cache identifier to load an exception from cache.

Example:

vendor/bin/typo3 solver:solve -i c98d277467ab5da857483dff2b1d267d36c0c24a
Copied!
typo3/sysext/core/bin/typo3 solver:solve -i c98d277467ab5da857483dff2b1d267d36c0c24a
Copied!

-c|--code

-c|--code
Type
integer
Required
false
Default
none

Optional exception code.

Example:

vendor/bin/typo3 solver:solve "No TypoScript record found!" -c 1294587218
Copied!
typo3/sysext/core/bin/typo3 solver:solve "No TypoScript record found!" -c 1294587218
Copied!

-f|--file

-f|--file
Type
string
Required
false
Default
none

Optional file where the exception occurs.

Example:

vendor/bin/typo3 solver:solve "No TypoScript record found!" -f /var/www/html/vendor/typo3/cms-frontend/Classes/Controller/TypoScriptFrontendController.php
Copied!
typo3/sysext/core/bin/typo3 solver:solve "No TypoScript record found!" -f /var/www/html/vendor/typo3/cms-frontend/Classes/Controller/TypoScriptFrontendController.php
Copied!

-l|--line

-l|--line
Type
integer
Required
false
Default
none

Optional line number within the given file.

Example:

vendor/bin/typo3 solver:solve "No TypoScript record found!" -l 1190
Copied!
typo3/sysext/core/bin/typo3 solver:solve "No TypoScript record found!" -l 1190
Copied!

-r|--refresh

-r|--refresh
Type
boolean
Required
false
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
Copied!
typo3/sysext/core/bin/typo3 solver:solve "No TypoScript record found!" --refresh
Copied!

-j|--json

-j|--json
Type
boolean
Required
false
Default
false

Print solution as JSON.

Example:

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

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]
Copied!
typo3/sysext/core/bin/typo3 solver:list-models [options]
Copied!

The following input parameters are available:

-a|--all

-a|--all
Type
boolean
Required
false
Default
false

List all available models rather than only GPT models.

Example:

vendor/bin/typo3 solver:list-models --all
Copied!
typo3/sysext/core/bin/typo3 solver:list-models --all
Copied!

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>]
Copied!
typo3/sysext/core/bin/typo3 solver:cache:flush [<identifier>]
Copied!

The following input parameters are available:

identifier

identifier
Type
string
Required
false
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.

Example:

vendor/bin/typo3 solver:cache:flush 65e89b311899aa4728a4c1bced1d6f6335674422
Copied!
typo3/sysext/core/bin/typo3 solver:cache:flush 65e89b311899aa4728a4c1bced1d6f6335674422
Copied!