Skip to content

Commit

Permalink
fix: coding style checks
Browse files Browse the repository at this point in the history
  • Loading branch information
TyperEJ committed Nov 21, 2024
1 parent 72a83ad commit c7d0be9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Responses/Chat/CreateResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static function from(array $attributes, MetaInformation $meta): self
$attributes['model'],
$attributes['system_fingerprint'] ?? null,
$choices,
isset($attributes['usage']) ? CreateResponseUsage::from($attributes['usage']) : null,
isset($attributes['usage']) ? CreateResponseUsage::from($attributes['usage']) : null,

Check failure on line 59 in src/Responses/Chat/CreateResponse.php

View workflow job for this annotation

GitHub Actions / Formats P8.1 - ubuntu-latest - prefer-stable

Offset 'usage' on array{id: string, object: string, created: int, model: string, system_fingerprint?: string, choices: array<int, array{index: int, message: array{role: string, content: string|null, function_call: array{name: string, arguments: string}|null, tool_calls: array<int, array{id: string, type: string, function: array{name: string, arguments: string}}>|null}, finish_reason: string|null}>, usage: array{prompt_tokens: int, completion_tokens: int|null, total_tokens: int, prompt_tokens_details?: array{cached_tokens: int}, completion_tokens_details?: array{audio_tokens?: int, reasoning_tokens: int, accepted_prediction_tokens: int, rejected_prediction_tokens: int}}} in isset() always exists and is not nullable.

Check failure on line 59 in src/Responses/Chat/CreateResponse.php

View workflow job for this annotation

GitHub Actions / Formats P8.1 - ubuntu-latest - prefer-lowest

Offset 'usage' on array{id: string, object: string, created: int, model: string, system_fingerprint?: string, choices: array<int, array{index: int, message: array{role: string, content: string|null, function_call: array{name: string, arguments: string}|null, tool_calls: array<int, array{id: string, type: string, function: array{name: string, arguments: string}}>|null}, finish_reason: string|null}>, usage: array{prompt_tokens: int, completion_tokens: int|null, total_tokens: int, prompt_tokens_details?: array{cached_tokens: int}, completion_tokens_details?: array{audio_tokens?: int, reasoning_tokens: int, accepted_prediction_tokens: int, rejected_prediction_tokens: int}}} in isset() always exists and is not nullable.
$meta,
);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Responses/Embeddings/CreateResponse.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

use OpenAI\Responses\Embeddings\CreateResponse;
use OpenAI\Responses\Embeddings\CreateResponseUsage;
use OpenAI\Responses\Embeddings\CreateResponseEmbedding;
use OpenAI\Responses\Embeddings\CreateResponseUsage;
use OpenAI\Responses\Meta\MetaInformation;

test('from', function () {
Expand Down

0 comments on commit c7d0be9

Please sign in to comment.