Skip to content

Commit e496475

Browse files
committed
fix
1 parent 85fae76 commit e496475

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/elevenlabs/text-to-speech.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@
2626

2727
$result = $platform->invoke($model, new Text('Hello world'));
2828

29-
echo $result->asBase64() .\PHP_EOL;
29+
echo $result->asBase64().\PHP_EOL;

src/platform/src/Bridge/ElevenLabs/ElevenLabsClient.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function request(Model $model, array|string $payload, array $options = []
4444
$capabilities = $this->retrieveCapabilities($model);
4545

4646
if ([] === $capabilities) {
47-
throw new InvalidArgumentException(\sprintf('The model information could not be retrieved from the ElevenLabs API. Your model might not be supported. Try to use another one.'));
47+
throw new InvalidArgumentException('The model information could not be retrieved from the ElevenLabs API. Your model might not be supported. Try to use another one.');
4848
}
4949

5050
return $this->doTextToSpeechRequest($model, $payload, $options);
@@ -104,15 +104,15 @@ private function doTextToSpeechRequest(Model $model, array|string $payload, arra
104104

105105
private function retrieveCapabilities(Model $model): array
106106
{
107-
$capabilityResponse = $this->httpClient->request('GET', sprintf('%s/models', $this->hostUrl), [
107+
$capabilityResponse = $this->httpClient->request('GET', \sprintf('%s/models', $this->hostUrl), [
108108
'headers' => [
109109
'xi-api-key' => $this->apiKey,
110110
],
111111
]);
112112

113113
$models = $capabilityResponse->toArray();
114114

115-
$currentModelConfiguration = array_filter($models, static fn (array $informations): bool => $informations['model_id'] === $model->getName());
115+
$currentModelConfiguration = array_filter($models, static fn (array $information): bool => $information['model_id'] === $model->getName());
116116

117117
return reset($currentModelConfiguration);
118118
}

0 commit comments

Comments
 (0)