Prompts

AI models must be prompted to provide a solution for a given problem. For this, the extension provides a basic abstraction to implement such prompts.

interface Prompt
Fully qualified name
\EliasHaeussler\Typo3Solver\ProblemSolving\Solution\Prompt\Prompt

Basic abstraction to generate prompts for a given problem. Ideally, prompts are developed to match a specific model.

static create ( )

Create a new instance of the prompt generator. This is mainly used on a low level basis where dependency injection is not available.

returns

An instance of the current prompt generator.

generate ( $exception)

Generate a prompt to provide a solution for the given exception.

param Throwable $exception

The exception to generate a prompt for

returntype

string

Default prompt

The extension already ships a default prompt, targeting the GPT-3.5 model.

class DefaultPrompt
Fully qualified name
\EliasHaeussler\Typo3Solver\ProblemSolving\Solution\Prompt\DefaultPrompt

Default prompt generator, mainly developed for the GPT-3.5 model, but can be used for other models as well. It passes the following information to the OpenAI model:

  • Exception class
  • Exception message
  • File where the exception was triggered
  • Line where the exception was triggered
  • Code snippet of the line that triggered the exception
  • Installation mode (composer or legacy)
  • Installed TYPO3 version
  • Installed PHP version