Skip to content

Commit

Permalink
Fix code styling
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoziy committed Sep 11, 2024
2 parents 16e3766 + 98c15b4 commit 5cb7d5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Commands/OpenAIManagementFilesUpdateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ private function uploadFiles(\OpenAI\Client $openAIClient, mixed $projectModel)
)->path($fileModel->local_file_path_name),
'r',
),
]);
]
);
} catch (ErrorException $exception) {
$this->error('Error uploading a file: '.$exception->getMessage());
Log::error('Error uploading a file', [
Expand Down
4 changes: 3 additions & 1 deletion src/OpenAI/ClientWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ public static function make(OpenAIManagementProject $projectModel): ClientWrappe
public function downloadStreamTo(string $fileId, string $path): void
{
$this->httpClient->request(
'GET', "https://api.openai.com/v1/files/$fileId/content", [
'GET',
"https://api.openai.com/v1/files/$fileId/content",
[
'headers' => [
'Authorization' => 'Bearer '.Crypt::decrypt($this->key),
],
Expand Down

0 comments on commit 5cb7d5a

Please sign in to comment.