<?php
namespace Claromentis\Core\Ai;

$GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"] = (@$GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"] ?: array()) + array("_cc728da4f277c0" . "480a16d9c70a1b5" . "05a" => base64_decode("dG9" . "wX2" . "s="), "_16800403a" . "5ed18b8f95" . "f8aab66033" . "96c" => base64_decode("cmVzcG9" . "uc2VfbW" . "ltZV90e" . "XBl"), "_91cf532e6" . "16098b2b8e" . "de14ed22e3" . "744" => base64_decode("dGh" . "pbm" . "tpb" . "mc="), "_2f6f8cc0f8589" . "3c4a78cb7e0efd" . "c5df7" => base64_decode("dGV4dC9wb" . "GFpbg=="), "_c03ddb4eb74" . "8c3a7d2235b6" . "42e944863" => base64_decode("dGVtcGVyYX" . "R1cmU="), "_e80d78064759a" . "37c89a68c56321" . "c42c5" => base64_decode("bWF4X291dHB1d" . "F90b2tlbnM="), "_3aac11e456555ea60fb595" . "09d5ae9965" => base64_decode("dG9wX" . "3A="), "_0b4b4ff99befdef2eebaa99e9475002" . "7" => base64_decode("cmVzcG9uc2Vf" . "c2NoZW1h"), "_dfec7e1cbbaedbb732332278565" . "a2701" => base64_decode("YXBwbGljYXRpb24vanN" . "vbg=="), "_bd71c3b5c201fc11db82ed14c" . "e424de5" => base64_decode("aW5fYXJyYX" . "k="));
use Claromentis\Core\Ai\Tools\AiToolInterface;
use Claromentis\Core\Security\SecurityContext;
use Override;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Webmozart\Assert\Assert;
class AiTextGenerationConfiguration implements AiConfigurationInterface
{
    public const DEFAULT_RESPONSE_MIME_TYPE = 'text/plain';
    public const DEFAULT_RESPONSE_SCHEMA = [];
    public const DEFAULT_TEMPERATURE = 0.7;
    public const DEFAULT_TOP_P = 1.0;
    public const DEFAULT_TOP_K = 50;
    public const DEFAULT_THINKING = false;
    public const MAX_OUTPUT_TOKENS = 8192;
    private ?SecurityContext $context = null;
    private ?SessionInterface $session = null;
    private string $responseMimeType = self::DEFAULT_RESPONSE_MIME_TYPE;
    private array $responseSchema = self::DEFAULT_RESPONSE_SCHEMA;
    private float $temperature = self::DEFAULT_TEMPERATURE;
    private float $topP = self::DEFAULT_TOP_P;
    private int $topK = self::DEFAULT_TOP_K;
    private bool $thinking = self::DEFAULT_THINKING;
    private int $maxOutputTokens = self::MAX_OUTPUT_TOKENS;
    
    
    
    
    private array $tools = [];
    #[Override]
    public function setContext(SecurityContext $context) : self
    {
        $this->context = $context;
        return $this;
    }
    #[Override]
    public function getContext() : ?SecurityContext
    {
        return $this->context;
    }
    #[Override]
    public function setSession(SessionInterface $session) : self
    {
        $this->session = $session;
        return $this;
    }
    #[Override]
    public function getSession() : ?SessionInterface
    {
        return $this->session;
    }
    
    
    
    
    
    
    
    
    public function getTemperature() : float
    {
        return $this->temperature;
    }
    
    
    
    
    
    
    
    
    
    
    
    
    public function setTemperature(float $_c03ddb4eb748c3a7d2235b642e944863) : self
    {
        $this->temperature = $_c03ddb4eb748c3a7d2235b642e944863;
        return $this;
    }
    
    
    
    
    
    
    
    
    public function getTopP() : float
    {
        return $this->topP;
    }
    
    
    
    
    
    
    
    
    
    
    
    
    public function setTopP(float $_3aac11e456555ea60fb59509d5ae9965) : self
    {
        $this->topP = $_3aac11e456555ea60fb59509d5ae9965;
        return $this;
    }
    
    
    
    
    
    
    
    
    public function getTopK() : int
    {
        return $this->topK;
    }
    
    
    
    
    
    
    
    
    
    
    
    public function setTopK(float $_cc728da4f277c0480a16d9c70a1b505a) : self
    {
        $this->topK = (int) $_cc728da4f277c0480a16d9c70a1b505a;
        return $this;
    }
    
    
    
    
    
    
    public function getResponseMimeType() : string
    {
        return $this->responseMimeType;
    }
    
    
    
    
    
    
    
    
    
    public function setResponseMimeType(string $_cd261a0ff13e4a972caf38ba0d735df6) : self
    {
        if (!$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_bd71c3b5c201fc11db82ed14ce424de" . "5"]($_cd261a0ff13e4a972caf38ba0d735df6, [$GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_2f6f8cc0f85893c4a78c" . "b7e0efdc5df7"], $GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_dfec7e1" . "cbbaedbb" . "73233227" . "8565a270" . "1"]])) {
            return $this;
        }
        $this->responseMimeType = $_cd261a0ff13e4a972caf38ba0d735df6;
        return $this;
    }
    
    
    
    
    
    
    public function getResponseSchema() : array
    {
        return $this->responseSchema;
    }
    
    
    
    
    
    
    
    
    
    public function setResponseSchema(array $_af238b1b28f8dbe6d89ba34d0a85a77c) : self
    {
        $this->responseSchema = $_af238b1b28f8dbe6d89ba34d0a85a77c;
        return $this;
    }
    
    
    
    
    
    
    public function getThinking() : bool
    {
        return $this->thinking;
    }
    
    
    
    
    
    
    
    
    
    
    public function setThinking(bool $_99cee2d2272a8550f4b21e3cb57fff7d) : self
    {
        $this->thinking = $_99cee2d2272a8550f4b21e3cb57fff7d;
        return $this;
    }
    
    
    
    
    
    
    
    public function setMaxOutputTokens(int $_e0d97eb4b205d8e1c5f6153f158d3e09) : self
    {
        $this->maxOutputTokens = $_e0d97eb4b205d8e1c5f6153f158d3e09;
        return $this;
    }
    
    
    
    
    
    
    public function getMaxOutputTokens() : int
    {
        return $this->maxOutputTokens;
    }
    
    
    
    
    
    
    public function getTools() : array
    {
        return $this->tools;
    }
    public function addTool(AiToolInterface $_d6e6f9df1b2622ef2f11bae658f98f1a)
    {
        $this->tools[$_d6e6f9df1b2622ef2f11bae658f98f1a->getName()] = $_d6e6f9df1b2622ef2f11bae658f98f1a;
    }
    public function addTools(array $_0c0eb6e55c5fb244e00a8111cd93738e)
    {
        Assert::allIsInstanceOf($_0c0eb6e55c5fb244e00a8111cd93738e, AiToolInterface::class);
        
        
        
        
        foreach ($_0c0eb6e55c5fb244e00a8111cd93738e as $_f5541d132a41089a60ef382afdec6d63) {
            $this->tools[$_f5541d132a41089a60ef382afdec6d63->getName()] = $_f5541d132a41089a60ef382afdec6d63;
        }
    }
    public function getToolByName(string $name) : ?AiToolInterface
    {
        return $this->tools[$name] ?? null;
    }
    public function toArray() : array
    {
        return [$GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_c03ddb4eb748c3a7d2235b642e" . "944863"] => $this->temperature, $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_3aac11e456" . "555ea60fb59" . "509d5ae9965"] => $this->topP, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_cc728da4f277" . "c0480a16d9c70" . "a1b505a"] => $this->topK, $GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_16800403a5ed18b8f95f8aa" . "b6603396c"] => $this->responseMimeType, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_0b4b4ff99befdef2eebaa99e9475002" . "7"] => $this->responseSchema, $GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_91cf532e616098b2b8ede14ed22" . "e3744"] => $this->thinking, $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_e80d780" . "64759a37" . "c89a68c5" . "6321c42c" . "5"] => $this->maxOutputTokens];
    }
}