|
669 | 669 | ->stringNode('database')->isRequired()->end() |
670 | 670 | ->stringNode('collection')->isRequired()->end() |
671 | 671 | ->stringNode('index_name')->isRequired()->end() |
672 | | - ->stringNode('vector_field')->end() |
| 672 | + ->stringNode('vector_field')->isRequired()->end() |
673 | 673 | ->booleanNode('bulk_write')->end() |
674 | 674 | ->end() |
675 | 675 | ->end() |
|
684 | 684 | ->stringNode('database')->cannotBeEmpty()->end() |
685 | 685 | ->stringNode('vector_index_name')->cannotBeEmpty()->end() |
686 | 686 | ->stringNode('node_name')->cannotBeEmpty()->end() |
687 | | - ->stringNode('vector_field')->end() |
688 | | - ->integerNode('dimensions')->end() |
689 | | - ->stringNode('distance')->end() |
| 687 | + ->stringNode('vector_field')->isRequired()->end() |
| 688 | + ->integerNode('dimensions')->isRequired()->end() |
| 689 | + ->stringNode('distance')->isRequired()->end() |
690 | 690 | ->booleanNode('quantization')->end() |
691 | 691 | ->end() |
692 | 692 | ->end() |
|
701 | 701 | ->end() |
702 | 702 | ->stringNode('namespace')->end() |
703 | 703 | ->arrayNode('filter') |
704 | | - ->scalarPrototype()->end() |
| 704 | + ->scalarPrototype() |
| 705 | + ->defaultValue([]) |
| 706 | + ->end() |
705 | 707 | ->end() |
706 | 708 | ->integerNode('top_k')->end() |
707 | 709 | ->end() |
708 | 710 | ->end() |
709 | 711 | ->end() |
| 712 | + ->arrayNode('postgres') |
| 713 | + ->useAttributeAsKey('name') |
| 714 | + ->arrayPrototype() |
| 715 | + ->children() |
| 716 | + ->stringNode('dsn')->cannotBeEmpty()->end() |
| 717 | + ->stringNode('username')->end() |
| 718 | + ->stringNode('password')->end() |
| 719 | + ->stringNode('table_name')->isRequired()->end() |
| 720 | + ->stringNode('vector_field')->isRequired()->end() |
| 721 | + ->enumNode('distance') |
| 722 | + ->info('Distance metric to use for vector similarity search') |
| 723 | + ->enumFqcn(PostgresDistance::class) |
| 724 | + ->defaultValue(PostgresDistance::L2) |
| 725 | + ->end() |
| 726 | + ->stringNode('dbal_connection')->cannotBeEmpty()->end() |
| 727 | + ->end() |
| 728 | + ->validate() |
| 729 | + ->ifTrue(static fn (array $v): bool => !isset($v['dsn']) && !isset($v['dbal_connection'])) |
| 730 | + ->thenInvalid('Either "dsn" or "dbal_connection" must be configured.') |
| 731 | + ->end() |
| 732 | + ->validate() |
| 733 | + ->ifTrue(static fn (array $v): bool => isset($v['dsn'], $v['dbal_connection'])) |
| 734 | + ->thenInvalid('Either "dsn" or "dbal_connection" can be configured, but not both.') |
| 735 | + ->end() |
| 736 | + ->end() |
| 737 | + ->end() |
710 | 738 | ->arrayNode('qdrant') |
711 | 739 | ->useAttributeAsKey('name') |
712 | 740 | ->arrayPrototype() |
713 | 741 | ->children() |
714 | 742 | ->stringNode('endpoint')->cannotBeEmpty()->end() |
715 | 743 | ->stringNode('api_key')->cannotBeEmpty()->end() |
716 | 744 | ->stringNode('collection_name')->cannotBeEmpty()->end() |
717 | | - ->integerNode('dimensions')->end() |
718 | | - ->stringNode('distance')->end() |
| 745 | + ->integerNode('dimensions')->isRequired()->end() |
| 746 | + ->stringNode('distance')->isRequired()->end() |
719 | 747 | ->booleanNode('async')->end() |
720 | 748 | ->end() |
721 | 749 | ->end() |
|
741 | 769 | ->end() |
742 | 770 | ->end() |
743 | 771 | ->validate() |
744 | | - ->ifTrue(static fn ($v) => !isset($v['connection_parameters']) && !isset($v['client'])) |
| 772 | + ->ifTrue(static fn (array $v): bool => !isset($v['connection_parameters']) && !isset($v['client'])) |
745 | 773 | ->thenInvalid('Either "connection_parameters" or "client" must be configured.') |
746 | 774 | ->end() |
747 | 775 | ->validate() |
748 | | - ->ifTrue(static fn ($v) => isset($v['connection_parameters']) && isset($v['client'])) |
| 776 | + ->ifTrue(static fn (array $v): bool => isset($v['connection_parameters']) && isset($v['client'])) |
749 | 777 | ->thenInvalid('Either "connection_parameters" or "client" can be configured, but not both.') |
750 | 778 | ->end() |
751 | 779 | ->end() |
752 | 780 | ->end() |
753 | | - ->arrayNode('surreal_db') |
754 | | - ->useAttributeAsKey('name') |
755 | | - ->arrayPrototype() |
756 | | - ->children() |
757 | | - ->stringNode('endpoint')->cannotBeEmpty()->end() |
758 | | - ->stringNode('username')->cannotBeEmpty()->end() |
759 | | - ->stringNode('password')->cannotBeEmpty()->end() |
760 | | - ->stringNode('namespace')->cannotBeEmpty()->end() |
761 | | - ->stringNode('database')->cannotBeEmpty()->end() |
762 | | - ->stringNode('table')->end() |
763 | | - ->stringNode('vector_field')->end() |
764 | | - ->stringNode('strategy')->end() |
765 | | - ->integerNode('dimensions')->end() |
766 | | - ->booleanNode('namespaced_user')->end() |
767 | | - ->end() |
768 | | - ->end() |
769 | | - ->end() |
770 | 781 | ->arrayNode('supabase') |
771 | 782 | ->useAttributeAsKey('name') |
772 | 783 | ->arrayPrototype() |
|
785 | 796 | ->end() |
786 | 797 | ->end() |
787 | 798 | ->end() |
788 | | - ->arrayNode('typesense') |
| 799 | + ->arrayNode('surrealdb') |
789 | 800 | ->useAttributeAsKey('name') |
790 | 801 | ->arrayPrototype() |
791 | 802 | ->children() |
792 | 803 | ->stringNode('endpoint')->cannotBeEmpty()->end() |
793 | | - ->stringNode('api_key')->isRequired()->end() |
794 | | - ->stringNode('collection')->isRequired()->end() |
795 | | - ->stringNode('vector_field')->end() |
796 | | - ->integerNode('dimensions')->end() |
| 804 | + ->stringNode('username')->cannotBeEmpty()->end() |
| 805 | + ->stringNode('password')->cannotBeEmpty()->end() |
| 806 | + ->stringNode('namespace')->cannotBeEmpty()->end() |
| 807 | + ->stringNode('database')->cannotBeEmpty()->end() |
| 808 | + ->stringNode('table')->isRequired()->end() |
| 809 | + ->stringNode('vector_field')->isRequired()->end() |
| 810 | + ->stringNode('strategy')->isRequired()->end() |
| 811 | + ->integerNode('dimensions')->isRequired()->end() |
| 812 | + ->booleanNode('namespaced_user')->end() |
797 | 813 | ->end() |
798 | 814 | ->end() |
799 | 815 | ->end() |
800 | | - ->arrayNode('weaviate') |
| 816 | + ->arrayNode('typesense') |
801 | 817 | ->useAttributeAsKey('name') |
802 | 818 | ->arrayPrototype() |
803 | 819 | ->children() |
804 | 820 | ->stringNode('endpoint')->cannotBeEmpty()->end() |
805 | 821 | ->stringNode('api_key')->isRequired()->end() |
806 | 822 | ->stringNode('collection')->isRequired()->end() |
| 823 | + ->stringNode('vector_field')->isRequired()->end() |
| 824 | + ->integerNode('dimensions')->isRequired()->end() |
807 | 825 | ->end() |
808 | 826 | ->end() |
809 | 827 | ->end() |
810 | | - ->arrayNode('postgres') |
| 828 | + ->arrayNode('weaviate') |
811 | 829 | ->useAttributeAsKey('name') |
812 | 830 | ->arrayPrototype() |
813 | 831 | ->children() |
814 | | - ->stringNode('dsn')->cannotBeEmpty()->end() |
815 | | - ->stringNode('username')->end() |
816 | | - ->stringNode('password')->end() |
817 | | - ->stringNode('table_name')->isRequired()->end() |
818 | | - ->stringNode('vector_field')->end() |
819 | | - ->enumNode('distance') |
820 | | - ->info('Distance metric to use for vector similarity search') |
821 | | - ->enumFqcn(PostgresDistance::class) |
822 | | - ->defaultValue(PostgresDistance::L2) |
823 | | - ->end() |
824 | | - ->stringNode('dbal_connection')->cannotBeEmpty()->end() |
825 | | - ->end() |
826 | | - ->validate() |
827 | | - ->ifTrue(static fn (array $v): bool => !isset($v['dsn']) && !isset($v['dbal_connection'])) |
828 | | - ->thenInvalid('Either "dsn" or "dbal_connection" must be configured.') |
829 | | - ->end() |
830 | | - ->validate() |
831 | | - ->ifTrue(static fn (array $v): bool => isset($v['dsn'], $v['dbal_connection'])) |
832 | | - ->thenInvalid('Either "dsn" or "dbal_connection" can be configured, but not both.') |
| 832 | + ->stringNode('endpoint')->cannotBeEmpty()->end() |
| 833 | + ->stringNode('api_key')->isRequired()->end() |
| 834 | + ->stringNode('collection')->isRequired()->end() |
833 | 835 | ->end() |
834 | 836 | ->end() |
835 | 837 | ->end() |
|
951 | 953 | ->end() |
952 | 954 | ->end() |
953 | 955 | ->end() |
954 | | - ->arrayNode('surreal_db') |
| 956 | + ->arrayNode('surrealdb') |
955 | 957 | ->useAttributeAsKey('name') |
956 | 958 | ->arrayPrototype() |
957 | 959 | ->children() |
|
0 commit comments