You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warning: An embeddings provider is configured but the 'vectorSearch' preview feature is not enabled.
388
388
- Enable vector search by adding 'vectorSearch' to the 'previewFeatures' configuration option, or remove the embeddings provider configuration if not needed.\
it("should warn if vectorSearch is enabled but embeddings provider is not configured",()=>{
799
+
constwarnStub=vi.fn();
800
+
warnIfVectorSearchNotEnabledCorrectly(
801
+
{
802
+
...defaultTestConfig,
803
+
previewFeatures: ["vectorSearch"],
804
+
},
805
+
warnStub
806
+
);
807
+
expect(warnStub).toBeCalledWith(`\
808
+
Warning: Vector search is enabled but no embeddings provider is configured.
809
+
- Set an embeddings provider configuration option to enable auto-embeddings during document insertion and text-based queries with $vectorSearch.\
810
+
`);
811
+
});
812
+
813
+
it("should warn if vectorSearch is not enabled but embeddings provider is configured",()=>{
814
+
constwarnStub=vi.fn();
815
+
warnIfVectorSearchNotEnabledCorrectly(
816
+
{
817
+
...defaultTestConfig,
818
+
voyageApiKey: "random-key",
819
+
},
820
+
warnStub
821
+
);
822
+
expect(warnStub).toBeCalledWith(`\
823
+
Warning: An embeddings provider is configured but the 'vectorSearch' preview feature is not enabled.
824
+
- Enable vector search by adding 'vectorSearch' to the 'previewFeatures' configuration option, or remove the embeddings provider configuration if not needed.\
825
+
`);
826
+
});
827
+
828
+
it("should not warn if vectorSearch is enabled correctly",()=>{
0 commit comments