Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Responses/Chat/CreateResponseMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
public readonly ?string $content,
public readonly array $toolCalls,
public readonly ?CreateResponseFunctionCall $functionCall,
public readonly ?string $reasoningContent,
) {}

/**
Expand All @@ -30,6 +31,7 @@
$attributes['content'] ?? null,
$toolCalls,
isset($attributes['function_call']) ? CreateResponseFunctionCall::from($attributes['function_call']) : null,
$attributes['reasoning_content'] ?? null,

Check failure on line 34 in src/Responses/Chat/CreateResponseMessage.php

View workflow job for this annotation

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

Offset 'reasoning_content' on 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} on left side of ?? does not exist.
);
}

Expand All @@ -51,6 +53,10 @@
$data['tool_calls'] = array_map(fn (CreateResponseToolCall $toolCall): array => $toolCall->toArray(), $this->toolCalls);
}

if ($this->reasoningContent) {
$data['reasoning_content'] = $this->reasoningContent;
}

return $data;
}
}
Loading