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

$GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"] = (@$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"] ?: array()) + array("_7f628626dd1d" . "55c71b1fc0932" . "ffd1d2c" => base64_decode("aXNfYXJ" . "yYXk="), "_e65d9ebe03c7b68f0" . "3597f9bf0f297d8" => base64_decode("RWFjaCBlbGVtZW50IG11c" . "3QgYmUgYW4gaW5zdGFuY2" . "Ugb2Yg"), "_2fa0716363a71f351fcbcf484ea9" . "e9a6" => base64_decode("RXhwZWN0ZWQgYSBzdHJpbmcsIGFuIGlu" . "c3RhbmNlIG9mIFBhcnRJbnRlcmZhY2Us" . "IG9yIGFuIGFycmF5IG9mIFBhcnRJbnRl" . "cmZhY2UgaW5zdGFuY2VzLg=="), "_5e30c4717ced36cff" . "9e93e19a5c576cc" => base64_decode("aXNfc3R" . "yaW5n"));
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["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_7f628626dd1d55c71b1fc0932" . "ffd1d2c"]($_9961f986823b4be7f5c4cc8379c6b228)) {
            Assert::allIsInstanceOf($_9961f986823b4be7f5c4cc8379c6b228, PartInterface::class, $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_e65d9ebe03c7b68f03597f9bf0f297d" . "8"] . PartInterface::class);
        } else {
            Assert::true($GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_5e30c4717ced36cff9e93e19a5c576" . "cc"]($_9961f986823b4be7f5c4cc8379c6b228) || $_9961f986823b4be7f5c4cc8379c6b228 instanceof PartInterface, $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_2fa0716363a71f351fcb" . "cf484ea9e9a6"]);
        }
    }
    
    
    
    
    
    
    
    
    
    public static function ingestTextGenerationParts($_9961f986823b4be7f5c4cc8379c6b228)
    {
        static::assertTextGenerationParts($_9961f986823b4be7f5c4cc8379c6b228);
        if ($GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_7f628626dd1d" . "55c71b1fc0932" . "ffd1d2c"]($_9961f986823b4be7f5c4cc8379c6b228)) {
            return $_9961f986823b4be7f5c4cc8379c6b228;
        }
        if ($_9961f986823b4be7f5c4cc8379c6b228 instanceof PartInterface) {
            return [$_9961f986823b4be7f5c4cc8379c6b228];
        }
        return [new TextPart($_9961f986823b4be7f5c4cc8379c6b228)];
    }
}