appConfig->getAppValueBool('fail-' . $this->getId())) { throw new ProcessingException('Failing as set by AppConfig'); } if (!isset($input['system_prompt']) || !is_string($input['system_prompt'])) { throw new RuntimeException('Invalid system prompt'); } if (!isset($input['input']) || !is_string($input['input'])) { throw new RuntimeException('Invalid input message'); } if (!isset($input['history']) || !is_array($input['history'])) { throw new RuntimeException('Invalid message history'); } return [ 'output' => 'This is a fake response message: ' . "\n\n- System prompt: " . $input['system_prompt'] . "\n- Input message: " . $input['input'] . "\n- Message history:\n" . count($input['history']) . ' messages', ]; } }