Skip to content

Commit c42a101

Browse files
Danni2901danni2901
andauthored
fix(azure): improve base URL logic to prevent double path segments (#226)
Co-authored-by: danni2901 <contact@nguyendo.id.vn>
1 parent f438840 commit c42a101

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Providers/AzureOpenAiProvider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ protected function buildAzureBaseUrl(): string
8383
{
8484
$url = rtrim($this->config['url'] ?? '', '/');
8585

86+
if (str_contains($url, '/openai/v1')) {
87+
return $url;
88+
}
89+
8690
return "{$url}/openai/v1";
8791
}
8892
}

0 commit comments

Comments
 (0)