Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into add-assistants-v2-api
Browse files Browse the repository at this point in the history
  • Loading branch information
gehrisandro committed May 26, 2024
2 parents b74b254 + 7ec1207 commit b471e64
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"require-dev": {
"guzzlehttp/guzzle": "^7.8.1",
"guzzlehttp/psr7": "^2.6.2",
"laravel/pint": "^1.15.3",
"mockery/mockery": "^1.6.11",
"laravel/pint": "^1.16.0",
"mockery/mockery": "^1.6.12",
"nunomaduro/collision": "^7.10.0",
"pestphp/pest": "^2.34.7",
"pestphp/pest-plugin-arch": "^2.7",
"pestphp/pest-plugin-type-coverage": "^2.8.1",
"phpstan/phpstan": "^1.10.67",
"rector/rector": "^1.0.4",
"pestphp/pest-plugin-type-coverage": "^2.8.2",
"phpstan/phpstan": "^1.11.2",
"rector/rector": "^1.1.0",
"symfony/var-dumper": "^6.4.7"
},
"autoload": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private function __construct(
/**
* Acts as static factory, and returns a new Response instance.
*
* @param array{step_details: array{type: 'tool_calls', tool_calls: array<int, array{id?: string, type: 'code_interpreter', code_interpreter: array{input: string, outputs: array<int, array{type: 'image', image: array{file_id: string}}|array{type: 'logs', logs: string}>}}|array{id: string, type: 'file_search', file_search: array<string, string>}|array{id?: string, type: 'function', function: array{name?: string, arguments: string, output?: ?string}}>}|array{type: 'message_creation', message_creation: array{message_id: string}}} $attributes
* @param array{step_details: array{type: 'tool_calls', tool_calls: array<int, array{id?: string, type: 'code_interpreter', code_interpreter: array{input: string, outputs?: array<int, array{type: 'image', image: array{file_id: string}}|array{type: 'logs', logs: string}>}}|array{id: string, type: 'file_search', file_search: array<string, string>}|array{id?: string, type: 'function', function: array{name?: string, arguments: string, output?: ?string}}>}|array{type: 'message_creation', message_creation: array{message_id: string}}} $attributes
*/
public static function from(array $attributes): self
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private function __construct(
/**
* Acts as static factory, and returns a new Response instance.
*
* @param array{id?: string, object: string, delta: array{step_details: array{type: 'tool_calls', tool_calls: array<int, array{id?: string, type: 'code_interpreter', code_interpreter: array{input: string, outputs: array<int, array{type: 'image', image: array{file_id: string}}|array{type: 'logs', logs: string}>}}|array{id: string, type: 'file_search', file_search: array<string, string>}|array{id?: string, type: 'function', function: array{name?: string, arguments: string, output?: ?string}}>}|array{type: 'message_creation', message_creation: array{message_id: string}}}} $attributes
* @param array{id?: string, object: string, delta: array{step_details: array{type: 'tool_calls', tool_calls: array<int, array{id?: string, type: 'code_interpreter', code_interpreter: array{input: string, outputs?: array<int, array{type: 'image', image: array{file_id: string}}|array{type: 'logs', logs: string}>}}|array{id: string, type: 'file_search', file_search: array<string, string>}|array{id?: string, type: 'function', function: array{name?: string, arguments: string, output?: ?string}}>}|array{type: 'message_creation', message_creation: array{message_id: string}}}} $attributes
*/
public static function from(array $attributes): self
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ private function __construct(
*/
public static function from(array $attributes): self
{
$outputs = isset($attributes['outputs']) ? array_map(
$outputs = array_map(
fn (array $output): \OpenAI\Responses\Threads\Runs\Steps\ThreadRunStepResponseCodeInterpreterOutputImage|\OpenAI\Responses\Threads\Runs\Steps\ThreadRunStepResponseCodeInterpreterOutputLogs => match ($output['type']) {
'image' => ThreadRunStepResponseCodeInterpreterOutputImage::from($output),
'logs' => ThreadRunStepResponseCodeInterpreterOutputLogs::from($output),
},
$attributes['outputs'],
) : null;
$attributes['outputs'] ?? [],
);

return new self(
$attributes['input'] ?? null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private function __construct(
/**
* Acts as static factory, and returns a new Response instance.
*
* @param array{type: 'tool_calls', tool_calls: array<int, array{id?: string, type: 'code_interpreter', code_interpreter: array{input: string, outputs: array<int, array{type: 'image', image: array{file_id: string}}|array{type: 'logs', logs: string}>}}|array{id: string, type: 'file_search', file_search: array<string, string>}|array{id?: string, type: 'function', function: array{name?: string, arguments: string, output?: ?string}}>} $attributes
* @param array{type: 'tool_calls', tool_calls: array<int, array{id?: string, type: 'code_interpreter', code_interpreter: array{input: string, outputs?: array<int, array{type: 'image', image: array{file_id: string}}|array{type: 'logs', logs: string}>}}|array{id: string, type: 'file_search', file_search: array<string, string>}|array{id?: string, type: 'function', function: array{name?: string, arguments: string, output?: ?string}}>} $attributes
*/
public static function from(array $attributes): self
{
Expand Down

0 comments on commit b471e64

Please sign in to comment.