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