@@ -2370,48 +2370,13 @@ public function testOpenSearchStoreWithCustomHttpClientCanBeConfigured()
23702370 }
23712371
23722372 public function testPineconeStoreCanBeConfigured ()
2373- {
2374- $ container = $ this ->buildContainer ([
2375- 'ai ' => [
2376- 'store ' => [
2377- 'pinecone ' => [
2378- 'my_pinecone_store ' => [],
2379- ],
2380- ],
2381- ],
2382- ]);
2383-
2384- $ this ->assertTrue ($ container ->hasDefinition ('ai.store.pinecone.my_pinecone_store ' ));
2385-
2386- $ definition = $ container ->getDefinition ('ai.store.pinecone.my_pinecone_store ' );
2387- $ this ->assertSame (PineconeStore::class, $ definition ->getClass ());
2388-
2389- $ this ->assertTrue ($ definition ->isLazy ());
2390- $ this ->assertCount (3 , $ definition ->getArguments ());
2391- $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (0 ));
2392- $ this ->assertSame (PineconeClient::class, (string ) $ definition ->getArgument (0 ));
2393- $ this ->assertSame ('my_pinecone_store ' , $ definition ->getArgument (1 ));
2394- $ this ->assertSame ([], $ definition ->getArgument (2 ));
2395-
2396- $ this ->assertTrue ($ definition ->hasTag ('proxy ' ));
2397- $ this ->assertSame ([['interface ' => StoreInterface::class]], $ definition ->getTag ('proxy ' ));
2398- $ this ->assertTrue ($ definition ->hasTag ('ai.store ' ));
2399-
2400- $ this ->assertTrue ($ container ->hasAlias ('.Symfony\AI\Store\StoreInterface $my_pinecone_store ' ));
2401- $ this ->assertTrue ($ container ->hasAlias ('Symfony\AI\Store\StoreInterface $myPineconeStore ' ));
2402- $ this ->assertTrue ($ container ->hasAlias ('.Symfony\AI\Store\StoreInterface $pinecone_my_pinecone_store ' ));
2403- $ this ->assertTrue ($ container ->hasAlias ('Symfony\AI\Store\StoreInterface $pineconeMyPineconeStore ' ));
2404- $ this ->assertTrue ($ container ->hasAlias ('Symfony\AI\Store\StoreInterface ' ));
2405- }
2406-
2407- public function testPineconeStoreWithCustomNamespaceCanBeConfigured ()
24082373 {
24092374 $ container = $ this ->buildContainer ([
24102375 'ai ' => [
24112376 'store ' => [
24122377 'pinecone ' => [
24132378 'my_pinecone_store ' => [
2414- 'namespace ' => 'my_namespace ' ,
2379+ 'index_name ' => 'my_index ' ,
24152380 ],
24162381 ],
24172382 ],
@@ -2424,14 +2389,15 @@ public function testPineconeStoreWithCustomNamespaceCanBeConfigured()
24242389 $ this ->assertSame (PineconeStore::class, $ definition ->getClass ());
24252390
24262391 $ this ->assertTrue ($ definition ->isLazy ());
2427- $ this ->assertCount (3 , $ definition ->getArguments ());
2392+ $ this ->assertCount (4 , $ definition ->getArguments ());
24282393 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (0 ));
24292394 $ this ->assertSame (PineconeClient::class, (string ) $ definition ->getArgument (0 ));
2430- $ this ->assertSame ('my_namespace ' , $ definition ->getArgument (1 ));
2431- $ this ->assertSame ([], $ definition ->getArgument (2 ));
2395+ $ this ->assertSame ('my_index ' , $ definition ->getArgument (1 ));
2396+ $ this ->assertSame ('my_pinecone_store ' , $ definition ->getArgument (2 ));
2397+ $ this ->assertSame ([], $ definition ->getArgument (3 ));
24322398
24332399 $ this ->assertTrue ($ definition ->hasTag ('proxy ' ));
2434- $ this ->assertSame ([['interface ' => StoreInterface::class]], $ definition ->getTag ('proxy ' ));
2400+ $ this ->assertSame ([['interface ' => StoreInterface::class], [ ' interface ' => ManagedStoreInterface::class] ], $ definition ->getTag ('proxy ' ));
24352401 $ this ->assertTrue ($ definition ->hasTag ('ai.store ' ));
24362402
24372403 $ this ->assertTrue ($ container ->hasAlias ('.Symfony\AI\Store\StoreInterface $my_pinecone_store ' ));
@@ -2441,14 +2407,14 @@ public function testPineconeStoreWithCustomNamespaceCanBeConfigured()
24412407 $ this ->assertTrue ($ container ->hasAlias ('Symfony\AI\Store\StoreInterface ' ));
24422408 }
24432409
2444- public function testPineconeStoreWithCustomClientCanBeConfigured ()
2410+ public function testPineconeStoreWithCustomIndexNameCanBeConfigured ()
24452411 {
24462412 $ container = $ this ->buildContainer ([
24472413 'ai ' => [
24482414 'store ' => [
24492415 'pinecone ' => [
24502416 'my_pinecone_store ' => [
2451- 'client ' => 'foo ' ,
2417+ 'index_name ' => 'custom_index ' ,
24522418 'namespace ' => 'my_namespace ' ,
24532419 ],
24542420 ],
@@ -2461,54 +2427,16 @@ public function testPineconeStoreWithCustomClientCanBeConfigured()
24612427 $ definition = $ container ->getDefinition ('ai.store.pinecone.my_pinecone_store ' );
24622428 $ this ->assertSame (PineconeStore::class, $ definition ->getClass ());
24632429
2464- $ this ->assertTrue ($ definition ->isLazy ());
2465- $ this ->assertCount (3 , $ definition ->getArguments ());
2466- $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (0 ));
2467- $ this ->assertSame ('foo ' , (string ) $ definition ->getArgument (0 ));
2468- $ this ->assertSame ('my_namespace ' , $ definition ->getArgument (1 ));
2469- $ this ->assertSame ([], $ definition ->getArgument (2 ));
2470-
2471- $ this ->assertTrue ($ definition ->hasTag ('proxy ' ));
2472- $ this ->assertSame ([['interface ' => StoreInterface::class]], $ definition ->getTag ('proxy ' ));
2473- $ this ->assertTrue ($ definition ->hasTag ('ai.store ' ));
2474-
2475- $ this ->assertTrue ($ container ->hasAlias ('.Symfony\AI\Store\StoreInterface $my_pinecone_store ' ));
2476- $ this ->assertTrue ($ container ->hasAlias ('Symfony\AI\Store\StoreInterface $myPineconeStore ' ));
2477- $ this ->assertTrue ($ container ->hasAlias ('.Symfony\AI\Store\StoreInterface $pinecone_my_pinecone_store ' ));
2478- $ this ->assertTrue ($ container ->hasAlias ('Symfony\AI\Store\StoreInterface $pineconeMyPineconeStore ' ));
2479- $ this ->assertTrue ($ container ->hasAlias ('Symfony\AI\Store\StoreInterface ' ));
2480- }
2481-
2482- public function testPineconeStoreWithTopKCanBeConfigured ()
2483- {
2484- $ container = $ this ->buildContainer ([
2485- 'ai ' => [
2486- 'store ' => [
2487- 'pinecone ' => [
2488- 'my_pinecone_store ' => [
2489- 'namespace ' => 'my_namespace ' ,
2490- 'top_k ' => 100 ,
2491- ],
2492- ],
2493- ],
2494- ],
2495- ]);
2496-
2497- $ this ->assertTrue ($ container ->hasDefinition ('ai.store.pinecone.my_pinecone_store ' ));
2498-
2499- $ definition = $ container ->getDefinition ('ai.store.pinecone.my_pinecone_store ' );
2500- $ this ->assertSame (PineconeStore::class, $ definition ->getClass ());
2501-
25022430 $ this ->assertTrue ($ definition ->isLazy ());
25032431 $ this ->assertCount (4 , $ definition ->getArguments ());
25042432 $ this ->assertInstanceOf (Reference::class, $ definition ->getArgument (0 ));
25052433 $ this ->assertSame (PineconeClient::class, (string ) $ definition ->getArgument (0 ));
2506- $ this ->assertSame ('my_namespace ' , $ definition ->getArgument (1 ));
2507- $ this ->assertSame ([] , $ definition ->getArgument (2 ));
2508- $ this ->assertSame (100 , $ definition ->getArgument (3 ));
2434+ $ this ->assertSame ('custom_index ' , $ definition ->getArgument (1 ));
2435+ $ this ->assertSame (' my_namespace ' , $ definition ->getArgument (2 ));
2436+ $ this ->assertSame ([] , $ definition ->getArgument (3 ));
25092437
25102438 $ this ->assertTrue ($ definition ->hasTag ('proxy ' ));
2511- $ this ->assertSame ([['interface ' => StoreInterface::class]], $ definition ->getTag ('proxy ' ));
2439+ $ this ->assertSame ([['interface ' => StoreInterface::class], [ ' interface ' => ManagedStoreInterface::class] ], $ definition ->getTag ('proxy ' ));
25122440 $ this ->assertTrue ($ definition ->hasTag ('ai.store ' ));
25132441
25142442 $ this ->assertTrue ($ container ->hasAlias ('.Symfony\AI\Store\StoreInterface $my_pinecone_store ' ));
@@ -7317,15 +7245,18 @@ private function getFullConfig(): array
73177245 ],
73187246 'pinecone ' => [
73197247 'my_pinecone_store ' => [
7248+ 'index_name ' => 'my_index ' ,
73207249 'namespace ' => 'my_namespace ' ,
73217250 'filter ' => ['category ' => 'books ' ],
73227251 'top_k ' => 10 ,
73237252 ],
73247253 'my_pinecone_store_with_filter ' => [
7254+ 'index_name ' => 'my_index ' ,
73257255 'namespace ' => 'my_namespace ' ,
73267256 'filter ' => ['category ' => 'books ' ],
73277257 ],
73287258 'my_pinecone_store_with_top_k ' => [
7259+ 'index_name ' => 'my_index ' ,
73297260 'namespace ' => 'my_namespace ' ,
73307261 'filter ' => ['category ' => 'books ' ],
73317262 'top_k ' => 10 ,
0 commit comments