Skip to content

Commit

Permalink
Add api-key.
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsNotYou committed Mar 14, 2024
1 parent a217e55 commit 5d93c29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stream-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Authorization: Bearer ' . $apiKey, # necessary for OpenAI
'api-key: ' . $apiKey, # necessary for Microsoft Azure AI
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_WRITEFUNCTION, function($ch, $data) {
Expand Down

0 comments on commit 5d93c29

Please sign in to comment.