diff --git a/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php b/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php index 79e0e2ccad0..37d65143fc5 100644 --- a/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php +++ b/code_samples/ai_actions/src/AI/Action/TranscribeAudioAction.php @@ -1,4 +1,6 @@ -getOutput(); - $includeTimestamps = $action->getActionContext()?->getActionTypeOptions()->get('include_timestamps', false) ?? false; + $includeTimestamps = $action->getActionContext() + ?->getActionTypeOptions() + ->get('include_timestamps', false) + ?? false; if (!$includeTimestamps) { $output = $this->removeTimestamps($output); diff --git a/code_samples/ai_actions/src/AI/REST/Input/Parser/TranscribeAudio.php b/code_samples/ai_actions/src/AI/REST/Input/Parser/TranscribeAudio.php index e55a8d34663..0951c9b7320 100644 --- a/code_samples/ai_actions/src/AI/REST/Input/Parser/TranscribeAudio.php +++ b/code_samples/ai_actions/src/AI/REST/Input/Parser/TranscribeAudio.php @@ -1,6 +1,6 @@ getModifiedImages(); $output->writeln(sprintf('Found %d modified image in the last 24h', $modifiedImages->getTotalCount())); - /** @var \Ibexa\Core\Repository\Values\Content\Content $content */ + /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ foreach ($modifiedImages as $content) { /** @var ?Value $value */ $value = $content->getFieldValue(self::IMAGE_FIELD_IDENTIFIER); @@ -104,9 +104,9 @@ private function getSuggestedAltText(string $imageEncodedInBase64, string $langu $action->setRuntimeContext(new RuntimeContext(['languageCode' => $languageCode])); $action->setActionContext( new ActionContext( - new Options(['default_locale_fallback' => 'en']), // System context - new Options(['max_lenght' => 100]), // Action Type options - new Options( // Action Handler options + new ActionConfigurationOptions(['default_locale_fallback' => 'en']), // System context + new ActionConfigurationOptions(['max_lenght' => 100]), // Action Type options + new ActionConfigurationOptions( // Action Handler options [ 'prompt' => 'Generate the alt text for this image in less than 100 characters.', 'temperature' => 0.7, diff --git a/code_samples/ai_actions/src/Form/Type/TextToTextOptionsType.php b/code_samples/ai_actions/src/Form/Type/TextToTextOptionsType.php index 17cacfecded..bc2d4306d32 100644 --- a/code_samples/ai_actions/src/Form/Type/TextToTextOptionsType.php +++ b/code_samples/ai_actions/src/Form/Type/TextToTextOptionsType.php @@ -1,6 +1,6 @@