diff --git a/src/Clients/Response.php b/src/Clients/Response.php index af58400..c3bbe5d 100755 --- a/src/Clients/Response.php +++ b/src/Clients/Response.php @@ -276,6 +276,10 @@ public static function updateFromArray(self $response, array $data): Response if($content['type'] === 'tool_reference'){ $message->addReference($content); } + + if($content['type'] === 'tool_file'){ + $message->addReference($content); + } } } @@ -380,7 +384,7 @@ public static function updateFromArray(self $response, array $data): Response $message->setChunk($data['content']); } - if(isset($data['content']) && is_array($data['content']) && isset($data['content']['type']) && $data['content']['type'] === 'tool_reference' ){ + if(isset($data['content']) && is_array($data['content']) && isset($data['content']['type']) && in_array($data['content']['type'], ['tool_reference', 'tool_file']) ){ $message->addReference($data['content']); }