Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi authored and github-actions[bot] committed Mar 26, 2023
1 parent 609abb4 commit fa3eff2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/V1.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public function ask(

$line = $this->formatStreamMessage($line);

if (!$this->checkFields($line)) {
if (! $this->checkFields($line)) {
if (isset($line["detail"]) && $line["detail"] === "Too many requests in 1 hour. Try again later.") {
throw new Exception("Rate limit exceeded");
}
Expand Down Expand Up @@ -283,7 +283,7 @@ public function getConversations(int $offset = 0, int $limit = 20, $account = 0)
throw new Exception('Response is not json');
}

if (!isset($data['items'])) {
if (! isset($data['items'])) {
throw new Exception('Field missing');
}

Expand Down
2 changes: 1 addition & 1 deletion src/V2.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function ask(string $prompt, string $user = null, bool $stream = false)
throw new Exception('Response is not json');
}

if (!$this->checkFields($data)) {
if (! $this->checkFields($data)) {
throw new Exception('Field missing');
}

Expand Down

0 comments on commit fa3eff2

Please sign in to comment.