@php $fileSearchActive = false; $codeInterpreterActive = false; if (isset($assistant["tools"])) { foreach ($assistant["tools"] as $tool) { if (isset($tool['type'])) { if ($tool['type'] === 'file_search') { $fileSearchActive = true; } if ($tool['type'] === 'code_interpreter') { $codeInterpreterActive = true; } } } } @endphp