@@ -650,37 +650,37 @@ public function testUsingModel(): void
650650    public  function  testUsingModelConfig (): void 
651651    {
652652        $ buildernew  PromptBuilder ($ this registry );
653-          
653+ 
654654        // Set some initial config values on the builder 
655655        $ builderusingSystemInstruction ('Builder instruction ' )
656656                ->usingMaxTokens (500 )
657657                ->usingTemperature (0.5 );
658-          
658+ 
659659        // Create a config to merge 
660660        $ confignew  ModelConfig ();
661661        $ configsetSystemInstruction ('Config instruction ' );
662662        $ configsetMaxTokens (1000 );
663663        $ configsetTopP (0.9 );
664664        $ configsetTopK (40 );
665-          
665+ 
666666        $ result$ builderusingModelConfig ($ config
667-          
667+ 
668668        // Assert fluent interface 
669669        $ this assertSame ($ builder$ result
670-          
670+ 
671671        // Get the merged config 
672672        $ reflectionnew  \ReflectionClass ($ builder
673673        $ configProperty$ reflectiongetProperty ('modelConfig ' );
674674        $ configPropertysetAccessible (true );
675-          
675+ 
676676        /** @var ModelConfig $mergedConfig */ 
677677        $ mergedConfig$ configPropertygetValue ($ builder
678-          
678+ 
679679        // Assert builder values take precedence 
680680        $ this assertEquals ('Builder instruction ' , $ mergedConfiggetSystemInstruction ());
681681        $ this assertEquals (500 , $ mergedConfiggetMaxTokens ());
682682        $ this assertEquals (0.5 , $ mergedConfiggetTemperature ());
683-          
683+ 
684684        // Assert config values are used when builder doesn't have them 
685685        $ this assertEquals (0.9 , $ mergedConfiggetTopP ());
686686        $ this assertEquals (40 , $ mergedConfiggetTopK ());
@@ -694,42 +694,42 @@ public function testUsingModelConfig(): void
694694    public  function  testUsingModelConfigWithCustomOptions (): void 
695695    {
696696        $ buildernew  PromptBuilder ($ this registry );
697-          
697+ 
698698        // Create a config with custom options 
699699        $ confignew  ModelConfig ();
700700        $ configsetCustomOption ('stopSequences ' , ['CONFIG_STOP ' ]);
701701        $ configsetCustomOption ('otherOption ' , 'value ' );
702-          
702+ 
703703        $ builderusingModelConfig ($ config
704-          
704+ 
705705        // Get the merged config 
706706        $ reflectionnew  \ReflectionClass ($ builder
707707        $ configProperty$ reflectiongetProperty ('modelConfig ' );
708708        $ configPropertysetAccessible (true );
709-          
709+ 
710710        /** @var ModelConfig $mergedConfig */ 
711711        $ mergedConfig$ configPropertygetValue ($ builder
712712        $ customOptions$ mergedConfiggetCustomOptions ();
713-          
713+ 
714714        // Assert config custom options are preserved 
715715        $ this assertArrayHasKey ('stopSequences ' , $ customOptions
716716        $ this assertIsArray ($ customOptions'stopSequences ' ]);
717717        $ this assertEquals (['CONFIG_STOP ' ], $ customOptions'stopSequences ' ]);
718718        $ this assertArrayHasKey ('otherOption ' , $ customOptions
719719        $ this assertEquals ('value ' , $ customOptions'otherOption ' ]);
720-          
720+ 
721721        // Now set a builder value that overrides one of the custom options 
722722        $ builderusingStopSequences ('STOP ' );
723-          
723+ 
724724        // Get the config again 
725725        $ mergedConfig$ configPropertygetValue ($ builder
726726        $ customOptions$ mergedConfiggetCustomOptions ();
727-          
727+ 
728728        // Assert builder's stop sequences override the config's 
729729        $ this assertArrayHasKey ('stopSequences ' , $ customOptions
730730        $ this assertIsArray ($ customOptions'stopSequences ' ]);
731731        $ this assertEquals (['STOP ' ], $ customOptions'stopSequences ' ]);
732-          
732+ 
733733        // Assert other custom options are still preserved 
734734        $ this assertArrayHasKey ('otherOption ' , $ customOptions
735735        $ this assertEquals ('value ' , $ customOptions'otherOption ' ]);
0 commit comments