Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Remove superflous header #127

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Anthropic/Platform/Anthropic.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/OpenAI/Platform/Azure.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions src/OpenAI/Platform/OpenAI.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]);
}
}
1 change: 0 additions & 1 deletion src/Store/Azure/SearchStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/Voyage/Platform/Voyage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]);
Expand Down