diff --git a/src/Anthropic/Platform/Anthropic.php b/src/Anthropic/Platform/Anthropic.php index 891823b6..b2054003 100644 --- a/src/Anthropic/Platform/Anthropic.php +++ b/src/Anthropic/Platform/Anthropic.php @@ -31,7 +31,6 @@ public function request(array $body): iterable $response = $this->httpClient->request('POST', 'https://api.anthropic.com/v1/messages', [ 'headers' => [ 'x-api-key' => $this->apiKey, - 'Content-Type' => 'application/json', 'anthropic-version' => '2023-06-01', ], 'json' => $body, diff --git a/src/OpenAI/Platform/Azure.php b/src/OpenAI/Platform/Azure.php index 3b0a5f78..84d3da45 100644 --- a/src/OpenAI/Platform/Azure.php +++ b/src/OpenAI/Platform/Azure.php @@ -30,7 +30,6 @@ protected function rawRequest(string $endpoint, array $body): ResponseInterface return $this->httpClient->request('POST', $url, [ 'headers' => [ 'api-key' => $this->apiKey, - 'Content-Type' => 'application/json', ], 'query' => ['api-version' => $this->apiVersion], 'json' => $body, diff --git a/src/OpenAI/Platform/OpenAI.php b/src/OpenAI/Platform/OpenAI.php index b3d4bfde..8dfac1b5 100644 --- a/src/OpenAI/Platform/OpenAI.php +++ b/src/OpenAI/Platform/OpenAI.php @@ -26,8 +26,7 @@ protected function rawRequest(string $endpoint, array $body): ResponseInterface return $this->httpClient->request('POST', $url, [ 'auth_bearer' => $this->apiKey, - 'headers' => ['Content-Type' => 'application/json'], - 'body' => json_encode($body), + 'json' => $body, ]); } } diff --git a/src/Store/Azure/SearchStore.php b/src/Store/Azure/SearchStore.php index 8bfcb636..b8ac89e2 100644 --- a/src/Store/Azure/SearchStore.php +++ b/src/Store/Azure/SearchStore.php @@ -54,7 +54,6 @@ private function request(string $endpoint, array $payload): array $response = $this->httpClient->request('POST', $url, [ 'headers' => [ 'api-key' => $this->apiKey, - 'Content-Type' => 'application/json', ], 'query' => ['api-version' => $this->apiVersion], 'json' => $payload, diff --git a/src/Voyage/Platform/Voyage.php b/src/Voyage/Platform/Voyage.php index b23dac28..330e73e3 100644 --- a/src/Voyage/Platform/Voyage.php +++ b/src/Voyage/Platform/Voyage.php @@ -18,7 +18,6 @@ public function __construct( public function request(array $body): array { $response = $this->httpClient->request('POST', 'https://api.voyageai.com/v1/embeddings', [ - 'headers' => ['Content-Type' => 'application/json'], 'auth_bearer' => $this->apiKey, 'json' => $body, ]);