Skip to content
Snippets Groups Projects
Commit 68ca6e09 authored by Marcus Johansson's avatar Marcus Johansson
Browse files

Issue #3491147 by kalash-j, roromedia: Drupal Core version 10.2 not supported,...

Issue #3491147 by kalash-j, roromedia: Drupal Core version 10.2 not supported, should be reflected in info.yml
parent e45f48d4
No related branches found
No related tags found
3 merge requests!11Issue #3491147 by kalash-j, roromedia: Drupal Core version 10.2 not supported,...,!9Issue #3491147 by kalash-j, roromedia: Drupal Core version 10.2 not supported,...,!8Issue #3491147 by kalash-j, roromedia: Drupal Core version 10.2 not supported,...
Pipeline #383857 passed
......@@ -5,7 +5,7 @@ namespace Drupal\ai_provider_openai\Plugin\AiProvider;
use Drupal\Component\Serialization\Json;
use Drupal\Component\Utility\Crypt;
use Drupal\Core\Config\ImmutableConfig;
use Drupal\Core\File\FileSystemInterface;
use Drupal\Core\File\FileExists;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\ai\Attribute\AiProvider;
......@@ -446,7 +446,7 @@ class OpenAiProvider extends AiProviderClientBase implements
$input = $input->getBinary();
}
// The raw file has to become a resource, so we save a temporary file first.
$path = $this->fileSystem->saveData($input, 'temporary://speech_to_text.mp3', FileSystemInterface::EXISTS_REPLACE);
$path = $this->fileSystem->saveData($input, 'temporary://speech_to_text.mp3', FileExists::Replace);
$input = fopen($path, 'r');
$payload = [
'model' => $model_id,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment