Skip to content

Commit 2c5c91b

Browse files
committed
ref
1 parent 3aee581 commit 2c5c91b

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/ai-bundle/config/options.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
->end()
5757
->arrayNode('cartesia')
5858
->children()
59-
->stringNode('host')->end()
6059
->stringNode('api_key')->isRequired()->end()
6160
->stringNode('version')->isRequired()->end()
6261
->stringNode('http_client')

src/ai-bundle/src/AiBundle.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ private function processPlatformConfig(string $type, array $platform, ContainerB
305305
$platform['host'],
306306
new Reference($platform['http_client'], ContainerInterface::NULL_ON_INVALID_REFERENCE),
307307
new Reference('ai.platform.model_catalog.cartesia'),
308+
null,
308309
new Reference('event_dispatcher'),
309310
])
310311
->addTag('ai.platform', ['name' => 'cartesia']);

src/ai-bundle/tests/DependencyInjection/AiBundleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2796,9 +2796,9 @@ private function getFullConfig(): array
27962796
],
27972797
],
27982798
'cartesia' => [
2799-
'host' => 'https://api.cartesia.ai',
28002799
'api_key' => 'cartesia_key_full',
28012800
'version' => '2025-04-16',
2801+
'http_client' => 'http_client',
28022802
],
28032803
'eleven_labs' => [
28042804
'host' => 'https://api.elevenlabs.io/v1',

src/platform/src/Bridge/Cartesia/CartesiaClient.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public function __construct(
2828
private readonly HttpClientInterface $httpClient,
2929
#[\SensitiveParameter] private readonly string $apiKey,
3030
private readonly string $version,
31-
private readonly ?string $hostUrl = 'https://api.cartesia.ai',
3231
) {
3332
}
3433

@@ -52,7 +51,7 @@ public function request(Model $model, array|string $payload, array $options = []
5251
*/
5352
private function doTextToSpeech(Model $model, array|string $payload, array $options): RawHttpResult
5453
{
55-
return new RawHttpResult($this->httpClient->request('POST', \sprintf('%s/tts/bytes', $this->hostUrl), [
54+
return new RawHttpResult($this->httpClient->request('POST', 'https://api.cartesia.ai/tts/bytes', [
5655
'auth_bearer' => $this->apiKey,
5756
'headers' => [
5857
'Cartesia-Version' => $this->version,
@@ -76,7 +75,7 @@ private function doTextToSpeech(Model $model, array|string $payload, array $opti
7675
*/
7776
private function doSpeechToText(Model $model, array|string $payload, array $options): RawHttpResult
7877
{
79-
return new RawHttpResult($this->httpClient->request('POST', \sprintf('%s/stt', $this->hostUrl), [
78+
return new RawHttpResult($this->httpClient->request('POST', 'https://api.cartesia.ai/stt', [
8079
'auth_bearer' => $this->apiKey,
8180
'headers' => [
8281
'Cartesia-Version' => $this->version,

0 commit comments

Comments
 (0)