@@ -2741,6 +2741,30 @@ public function testVectorizerModelBooleanOptionsArePreserved()
27412741 $ this ->assertSame ('text-embedding-3-small?normalize=false&cache=true&nested%5Bbool%5D=false ' , $ vectorizerDefinition ->getArgument (1 ));
27422742 }
27432743
2744+ #[TestDox('Meilisearch store with custom semantic_ratio can be configured ' )]
2745+ public function testMeilisearchStoreWithCustomSemanticRatioCanBeConfigured ()
2746+ {
2747+ $ container = $ this ->buildContainer ([
2748+ 'ai ' => [
2749+ 'store ' => [
2750+ 'meilisearch ' => [
2751+ 'test_store ' => [
2752+ 'endpoint ' => 'http://127.0.0.1:7700 ' ,
2753+ 'api_key ' => 'test_key ' ,
2754+ 'index_name ' => 'test_index ' ,
2755+ 'semantic_ratio ' => 0.5 ,
2756+ ],
2757+ ],
2758+ ],
2759+ ],
2760+ ]);
2761+
2762+ $ this ->assertTrue ($ container ->hasDefinition ('ai.store.meilisearch.test_store ' ));
2763+ $ definition = $ container ->getDefinition ('ai.store.meilisearch.test_store ' );
2764+ $ arguments = $ definition ->getArguments ();
2765+ $ this ->assertSame (0.5 , $ arguments [7 ]);
2766+ }
2767+
27442768 private function buildContainer (array $ configuration ): ContainerBuilder
27452769 {
27462770 $ container = new ContainerBuilder ();
@@ -3061,28 +3085,4 @@ private function getFullConfig(): array
30613085 ],
30623086 ];
30633087 }
3064-
3065- #[TestDox('Meilisearch store with custom semantic_ratio can be configured ' )]
3066- public function testMeilisearchStoreWithCustomSemanticRatioCanBeConfigured ()
3067- {
3068- $ container = $ this ->buildContainer ([
3069- 'ai ' => [
3070- 'store ' => [
3071- 'meilisearch ' => [
3072- 'test_store ' => [
3073- 'endpoint ' => 'http://127.0.0.1:7700 ' ,
3074- 'api_key ' => 'test_key ' ,
3075- 'index_name ' => 'test_index ' ,
3076- 'semantic_ratio ' => 0.5 ,
3077- ],
3078- ],
3079- ],
3080- ],
3081- ]);
3082-
3083- $ this ->assertTrue ($ container ->hasDefinition ('ai.store.meilisearch.test_store ' ));
3084- $ definition = $ container ->getDefinition ('ai.store.meilisearch.test_store ' );
3085- $ arguments = $ definition ->getArguments ();
3086- $ this ->assertSame (0.5 , $ arguments [7 ]);
3087- }
30883088}
0 commit comments