Skip to content

Commit 2b43ad4

Browse files
authored
Update CreateResponseMessage.php
1 parent 17d1a23 commit 2b43ad4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Responses/Chat/CreateResponseMessage.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ private function __construct(
1414
public readonly ?string $content,
1515
public readonly array $toolCalls,
1616
public readonly ?CreateResponseFunctionCall $functionCall,
17+
public readonly ?string $reasoningContent,
1718
) {}
1819

1920
/**
@@ -30,6 +31,7 @@ public static function from(array $attributes): self
3031
$attributes['content'] ?? null,
3132
$toolCalls,
3233
isset($attributes['function_call']) ? CreateResponseFunctionCall::from($attributes['function_call']) : null,
34+
$attributes['reasoning_content'] ?? null,
3335
);
3436
}
3537

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

56+
if ($this->reasoningContent) {
57+
$data['reasoning_content'] = $this->reasoningContent;
58+
}
59+
5460
return $data;
5561
}
5662
}

0 commit comments

Comments
 (0)