<?php
namespace Claromentis\Core\Ai\Util;

$GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"] ?: array()) + array("_7f628626dd1d55c71b1fc0932ffd1d2" . "c" => base64_decode("aXNfY" . "XJyYX" . "k="), "_e65d9ebe03c7b68f03597" . "f9bf0f297d8" => base64_decode("RWFjaCBlbGVtZW50IG11c3QgYmUgYW" . "4gaW5zdGFuY2Ugb2Yg"), "_2fa0716" . "363a71f3" . "51fcbcf4" . "84ea9e9a" . "6" => base64_decode("RXhwZWN0ZWQgYSBzdHJpbmcsIGFuIGluc3RhbmNlIG9mIFBhcnRJbn" . "RlcmZhY2UsIG9yIGFuIGFycmF5IG9mIFBhcnRJbnRlcmZhY2UgaW5z" . "dGFuY2VzLg=="), "_5e30c4717ced36cff9e93e19a5c5" . "76cc" => base64_decode("aXN" . "fc3" . "Rya" . "W5n"));
use Claromentis\Core\Ai\Parts\PartInterface;
use Claromentis\Core\Ai\Parts\TextPart;
use Webmozart\Assert\Assert;
class Util
{
    
    
    
    
    
    
    
    
    
    public static function assertTextGenerationParts($_9961f986823b4be7f5c4cc8379c6b228)
    {
        if ($GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_7f628626dd1d55c71b1fc0932ff" . "d1d2c"]($_9961f986823b4be7f5c4cc8379c6b228)) {
            Assert::allIsInstanceOf($_9961f986823b4be7f5c4cc8379c6b228, PartInterface::class, $GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_e65d9ebe03" . "c7b68f03597" . "f9bf0f297d8"] . PartInterface::class);
        } else {
            Assert::true($GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_5e30c4717ced36cff9e93e" . "19a5c576cc"]($_9961f986823b4be7f5c4cc8379c6b228) || $_9961f986823b4be7f5c4cc8379c6b228 instanceof PartInterface, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_2fa0716363a71f35" . "1fcbcf484ea9e9a6"]);
        }
    }
    
    
    
    
    
    
    
    
    
    public static function ingestTextGenerationParts($_9961f986823b4be7f5c4cc8379c6b228)
    {
        static::assertTextGenerationParts($_9961f986823b4be7f5c4cc8379c6b228);
        if ($GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_7f628626dd" . "1d55c71b1fc" . "0932ffd1d2c"]($_9961f986823b4be7f5c4cc8379c6b228)) {
            return $_9961f986823b4be7f5c4cc8379c6b228;
        }
        if ($_9961f986823b4be7f5c4cc8379c6b228 instanceof PartInterface) {
            return [$_9961f986823b4be7f5c4cc8379c6b228];
        }
        return [new TextPart($_9961f986823b4be7f5c4cc8379c6b228)];
    }
}