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

$GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"] = (@$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"] ?: array()) + array("_e65d9ebe03c7b68f03597f9" . "bf0f297d8" => base64_decode("RWFjaCBlbGVtZW50IG11c3QgYmUgYW4gaW5zdGFuY2Ug" . "b2Yg"), "_5e30c4717ced3" . "6cff9e93e19a5c" . "576cc" => base64_decode("aXNfc3" . "RyaW5n"), "_7f62862" . "6dd1d55c" . "71b1fc09" . "32ffd1d2" . "c" => base64_decode("aXNfYXJyYX" . "k="), "_2fa0716363a71" . "f351fcbcf484ea" . "9e9a6" => base64_decode("RXhwZWN0ZWQgYSBzdHJpbmcsIGFuIGluc3RhbmNlIG9mIFBhcnRJbnRlcmZhY2UsIG9yIGFuIGFycmF5IG9mIFBhcnRJbnRlcmZhY2UgaW5zdGFuY2Vz" . "Lg=="));
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["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_7f628626dd1d55c71b1fc0932ffd1d" . "2c"]($_9961f986823b4be7f5c4cc8379c6b228)) {
            Assert::allIsInstanceOf($_9961f986823b4be7f5c4cc8379c6b228, PartInterface::class, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_e65d9ebe0" . "3c7b68f035" . "97f9bf0f29" . "7d8"] . PartInterface::class);
        } else {
            Assert::true($GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_5e30c4717ced36cf" . "f9e93e19a5c576cc"]($_9961f986823b4be7f5c4cc8379c6b228) || $_9961f986823b4be7f5c4cc8379c6b228 instanceof PartInterface, $GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_2fa0716363a71f351fcbcf484ea9e9" . "a6"]);
        }
    }
    
    
    
    
    
    
    
    
    
    public static function ingestTextGenerationParts($_9961f986823b4be7f5c4cc8379c6b228)
    {
        static::assertTextGenerationParts($_9961f986823b4be7f5c4cc8379c6b228);
        if ($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_7f628626d" . "d1d55c71b1" . "fc0932ffd1" . "d2c"]($_9961f986823b4be7f5c4cc8379c6b228)) {
            return $_9961f986823b4be7f5c4cc8379c6b228;
        }
        if ($_9961f986823b4be7f5c4cc8379c6b228 instanceof PartInterface) {
            return [$_9961f986823b4be7f5c4cc8379c6b228];
        }
        return [new TextPart($_9961f986823b4be7f5c4cc8379c6b228)];
    }
}