<?php
namespace Claromentis\Core\Ai\Adapters\Vertex\Responses\Embedding;

$GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"] = (@$GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"] ?: array()) + array("_f6435639088ceb6622480409bfdf" . "8fb7" => base64_decode("ZW1iZWRkaW5ncw" . "=="), "_38f12d8b8c719a8ce0fc2faefc225f3" . "5" => base64_decode("YXJyYXlfbWF" . "w"), "_31767d7ad" . "58e706dbf4" . "7b7a51a0fe" . "6c4" => base64_decode("Y2" . "91" . "bn" . "Q="), "_995c85e296" . "ce8fb69521b" . "dc6de9deb25" => base64_decode("Y3VycmVu" . "dA=="), "value" . "s" => base64_decode("dmFsdWV" . "z"), "_c36d11ec61d549064ca599774572" . "9b1c" => base64_decode("cHJlZGljdGlv" . "bnM="));
use Claromentis\Core\Ai\AiResponseInterface;
use Claromentis\Core\Ai\Parts\EmbeddingPart;
use Claromentis\Core\Ai\Parts\PartInterface;
class VertexAiGenerateTextEmbeddingResponse implements AiResponseInterface
{
    
    
    
    
    
    
    private array $embeddings;
    
    
    
    
    
    
    public function __construct(array $_f6435639088ceb6622480409bfdf8fb7)
    {
        $this->embeddings = $_f6435639088ceb6622480409bfdf8fb7;
    }
    
    
    
    
    
    
    
    public static function fromArray(array $_fd62bc4eaaf7d58dea9bada3e30443b9) : self
    {
        $_c36d11ec61d549064ca5997745729b1c = $_fd62bc4eaaf7d58dea9bada3e30443b9[$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_c36d11ec61d549064ca599774572" . "9b1c"]] ?? [];
        $_c36d11ec61d549064ca5997745729b1c = $GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_38f12d8b8c719a8ce0" . "fc2faefc225f35"](function ($_c60329b6b53016ba8929aff2f19abcc6) {
            $_f6435639088ceb6622480409bfdf8fb7 = $_c60329b6b53016ba8929aff2f19abcc6[$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_f6435639088ceb6622480409b" . "fdf8fb7"]];
            $values = $_f6435639088ceb6622480409bfdf8fb7[$GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["val" . "ues"]];
            return new EmbeddingPart($values);
        }, $_c36d11ec61d549064ca5997745729b1c);
        return new self($_c36d11ec61d549064ca5997745729b1c);
    }
    public function getResponse()
    {
        return $this->getEmbedding();
    }
    public function getParts() : array
    {
        return $this->embeddings;
    }
    public function hasTerminated() : bool
    {
        return false;
    }
    public function getEmbedding()
    {
        $_f6435639088ceb6622480409bfdf8fb7 = [];
        foreach ($this->embeddings as $_3a2f9b8d3dfb2adf6629fa5d473f1e03) {
            $_f6435639088ceb6622480409bfdf8fb7[] = $_3a2f9b8d3dfb2adf6629fa5d473f1e03->getValue();
        }
        return $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_31767d7ad58e706dbf47b7" . "a51a0fe6c4"]($_f6435639088ceb6622480409bfdf8fb7) > 1 ? $_f6435639088ceb6622480409bfdf8fb7 : $GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_995c85e296ce8fb69521bdc6de9deb" . "25"]($_f6435639088ceb6622480409bfdf8fb7);
    }
}