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
// TODO: Once OpenAITextEmbeddingGenerationService implements MEAI's IEmbeddingGenerator (#10811), configure it with the InMemoryVectorStore above instead of passing it here.
68
+
#pragma warning disable CS0618// VectorStoreTextSearch with ITextEmbeddingGenerationService is obsolete
Copy file name to clipboardExpand all lines: dotnet/src/IntegrationTests/Connectors/Memory/AzureAISearch/AzureAISearchTextSearchTests.cs
+4-4
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
// Copyright (c) Microsoft. All rights reserved.
2
2
3
-
#if DISABLED
4
-
5
3
usingSystem;
6
4
usingSystem.Threading.Tasks;
7
5
usingAzure.Identity;
@@ -87,7 +85,11 @@ public override Task<ITextSearch> CreateTextSearchAsync()
87
85
varstringMapper=newHotelTextSearchStringMapper();
88
86
varresultMapper=newHotelTextSearchResultMapper();
89
87
88
+
// TODO: Once OpenAITextEmbeddingGenerationService implements MEAI's IEmbeddingGenerator (#10811), configure it with the AzureAISearchVectorStore above instead of passing it here.
89
+
#pragma warning disable CS0618// VectorStoreTextSearch with ITextEmbeddingGenerationService is obsolete
// TODO: Once OpenAITextEmbeddingGenerationService implements MEAI's IEmbeddingGenerator (#10811), configure it with the InMemoryVectorStore above instead of passing it here.
54
+
#pragma warning disable CS0618// VectorStoreTextSearch with ITextEmbeddingGenerationService is obsolete
// TODO: Once OpenAITextEmbeddingGenerationService implements MEAI's IEmbeddingGenerator (#10811), configure it with the AzureAISearchVectorStore above instead of passing it here.
38
+
#pragma warning disable CS0618// VectorStoreTextSearch with ITextEmbeddingGenerationService is obsolete
if(vectorizedSearchis not null&&generationServiceis not null)
55
-
{
56
-
returnnewVectorStoreTextSearch<TRecord>(
57
-
vectorizedSearch,
58
-
generationService,
59
-
stringMapper,
60
-
resultMapper,
61
-
options);
62
-
}
63
43
64
-
thrownewInvalidOperationException("No IVectorizableTextSearch<TRecord> or IVectorizedSearch<TRecord> and ITextEmbeddingGenerationService registered.");
thrownewInvalidOperationException($"No IVectorizableTextSearch<TRecord> for service id {vectorizableTextSearchServiceId} registered.");
90
+
thrownewInvalidOperationException($"No IVectorSearch<TRecord> for service id {vectorSearchServiceId} registered.");
109
91
});
110
92
111
93
returnservices;
@@ -115,15 +97,16 @@ public static class TextSearchServiceCollectionExtensions
115
97
/// Register a <see cref="VectorStoreTextSearch{TRecord}"/> instance with the specified service ID.
116
98
/// </summary>
117
99
/// <param name="services">The <see cref="IServiceCollection"/> to register the <see cref="ITextSearch"/> on.</param>
118
-
/// <param name="vectorizedSearchServiceId">Service id of the <see cref="IVectorSearch{TRecord}"/> to use.</param>
100
+
/// <param name="vectorSearchServiceId">Service id of the <see cref="IVectorSearch{TRecord}"/> to use.</param>
119
101
/// <param name="textEmbeddingGenerationServiceId">Service id of the <see cref="ITextEmbeddingGenerationService"/> to use.</param>
120
102
/// <param name="stringMapper"><see cref="ITextSearchStringMapper" /> instance that can map a TRecord to a <see cref="string"/></param>
121
103
/// <param name="resultMapper"><see cref="ITextSearchResultMapper" /> instance that can map a TRecord to a <see cref="TextSearchResult"/></param>
122
104
/// <param name="options">Options used to construct an instance of <see cref="VectorStoreTextSearch{TRecord}"/></param>
123
105
/// <param name="serviceId">An optional service id to use as the service key.</param>
106
+
[Obsolete("Use the overload which doesn't accept a textEmbeddingGenerationServiceId, and configure an IEmbeddingGenerator instead with the collection represented by vectorSearchServiceId.")]
0 commit comments