@@ -23,14 +23,10 @@ public class Step4_Search_With_VectorStore(ITestOutputHelper output, InMemoryVec
23
23
public async Task UsingInMemoryVectorStoreRecordTextSearchAsync ( )
24
24
{
25
25
// Use embedding generation service and record collection for the fixture.
26
- var textEmbeddingGeneration = fixture . TextEmbeddingGenerationService ;
27
26
var collection = fixture . VectorStoreRecordCollection ;
28
27
29
28
// Create a text search instance using the InMemory vector store.
30
- // TODO: Once OpenAITextEmbeddingGenerationService implements MEAI's IEmbeddingGenerator (#10811), configure it with the collection
31
- #pragma warning disable CS0618 // VectorStoreTextSearch with ITextEmbeddingGenerationService is obsolete
32
- var textSearch = new VectorStoreTextSearch < DataModel > ( collection , textEmbeddingGeneration ) ;
33
- #pragma warning restore CS0618
29
+ var textSearch = new VectorStoreTextSearch < DataModel > ( collection ) ;
34
30
35
31
// Search and return results as TextSearchResult items
36
32
var query = "What is the Semantic Kernel?" ;
@@ -59,14 +55,11 @@ public async Task RagWithInMemoryVectorStoreTextSearchAsync()
59
55
Kernel kernel = kernelBuilder . Build ( ) ;
60
56
61
57
// Use embedding generation service and record collection for the fixture.
62
- var textEmbeddingGeneration = fixture . TextEmbeddingGenerationService ;
58
+ var embeddingGenerator = fixture . EmbeddingGenerator ;
63
59
var collection = fixture . VectorStoreRecordCollection ;
64
60
65
61
// Create a text search instance using the InMemory vector store.
66
- // TODO: Once OpenAITextEmbeddingGenerationService implements MEAI's IEmbeddingGenerator (#10811), configure it with the collection
67
- #pragma warning disable CS0618 // VectorStoreTextSearch with ITextEmbeddingGenerationService is obsolete
68
- var textSearch = new VectorStoreTextSearch < DataModel > ( collection , textEmbeddingGeneration ) ;
69
- #pragma warning restore CS0618
62
+ var textSearch = new VectorStoreTextSearch < DataModel > ( collection ) ;
70
63
71
64
// Build a text search plugin with vector store search and add to the kernel
72
65
var searchPlugin = textSearch . CreateWithGetTextSearchResults ( "SearchPlugin" ) ;
@@ -113,14 +106,11 @@ public async Task FunctionCallingWithInMemoryVectorStoreTextSearchAsync()
113
106
Kernel kernel = kernelBuilder . Build ( ) ;
114
107
115
108
// Use embedding generation service and record collection for the fixture.
116
- var textEmbeddingGeneration = fixture . TextEmbeddingGenerationService ;
109
+ var embeddingGenerator = fixture . EmbeddingGenerator ;
117
110
var collection = fixture . VectorStoreRecordCollection ;
118
111
119
112
// Create a text search instance using the InMemory vector store.
120
- // TODO: Once OpenAITextEmbeddingGenerationService implements MEAI's IEmbeddingGenerator (#10811), configure it with the collection
121
- #pragma warning disable CS0618 // VectorStoreTextSearch with ITextEmbeddingGenerationService is obsolete
122
- var textSearch = new VectorStoreTextSearch < DataModel > ( collection , textEmbeddingGeneration ) ;
123
- #pragma warning restore CS0618
113
+ var textSearch = new VectorStoreTextSearch < DataModel > ( collection ) ;
124
114
125
115
// Build a text search plugin with vector store search and add to the kernel
126
116
var searchPlugin = textSearch . CreateWithGetTextSearchResults ( "SearchPlugin" ) ;
0 commit comments