Skip to content

Commit 0cf5b59

Browse files
authored
Merge pull request #431 from Douglasokolaa/openai-embedding
Update base URI for OpenAI embeddings API
2 parents 5bbd811 + 5cd88a8 commit 0cf5b59

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/RAG/Embeddings/OpenAIEmbeddingsProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class OpenAIEmbeddingsProvider extends AbstractEmbeddingsProvider
1414
{
1515
use HasHttpClient;
1616

17-
protected string $baseUri = 'https://api.openai.com/v1/embeddings';
17+
protected string $baseUri = 'https://api.openai.com/v1';
1818

1919
public function __construct(
2020
protected string $key,
@@ -38,7 +38,7 @@ public function embedText(string $text): array
3838
{
3939
$response = $this->httpClient->request(
4040
HttpRequest::post(
41-
uri: '',
41+
uri: 'embeddings',
4242
body: [
4343
'model' => $this->model,
4444
'input' => $text,

0 commit comments

Comments
 (0)