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:
.
vendor/bin/typo3 solver:solve [<problem>] [options]
typo3/sysext/core/bin/typo3 solver:solve [<problem>] [options]
Problems can be solved in two ways on the command line:
- 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.
- 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-
attribute to the solution container element.
Note
This command is not schedulable.
The following input parameters are available:
problem
-
- Type
- string
- Required
- false
- 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!"
Copied!typo3/sysext/core/bin/typo3 solver:solve "No TypoScript record found!"
Copied!
-i|--identifier
-
- Type
- string
- Required
- false
- 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
Copied!typo3/sysext/core/bin/typo3 solver:solve -i c98d277467ab5da857483dff2b1d267d36c0c24a
Copied!
-c|--code
-
- Type
- integer
- Required
- false
- 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
Copied!typo3/sysext/core/bin/typo3 solver:solve "No TypoScript record found!" -c 1294587218
Copied!
-f|--file
-
- Type
- string
- Required
- false
- 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
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
-
- Type
- integer
- Required
- false
- 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
Copied!typo3/sysext/core/bin/typo3 solver:solve "No TypoScript record found!" -l 1190
Copied!
-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
-
- 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:
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]
typo3/sysext/core/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
-
- Type
- boolean
- Required
- false
- 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
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:
can be used.
vendor/bin/typo3 solver:cache:flush [<identifier>]
typo3/sysext/core/bin/typo3 solver:cache:flush [<identifier>]
The following input parameters are available:
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.
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
Copied!typo3/sysext/core/bin/typo3 solver:cache:flush 65e89b311899aa4728a4c1bced1d6f6335674422
Copied!