Skip to content

Commit ee64c81

Browse files
Update ServiceCollectionExtensions.cs
1 parent bd7f107 commit ee64c81

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

EssentialCSharp.Chat.Shared/Extensions/ServiceCollectionExtensions.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ public static IServiceCollection AddAzureOpenAIServices(this IServiceCollection
2121
string.IsNullOrEmpty(aiOptions.ApiKey))
2222
// Register Azure OpenAI services
2323
#pragma warning disable SKEXP0010 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
24-
services.AddAzureOpenAIEmbeddingGenerator(
25-
aiOptions.VectorGenerationDeploymentName,
26-
aiOptions.Endpoint,
27-
aiOptions.ApiKey);
28-
2924
services.AddAzureOpenAIChatClient(
3025
aiOptions.ChatDeploymentName,
3126
aiOptions.Endpoint,
@@ -42,6 +37,10 @@ public static IServiceCollection AddAzureOpenAIServices(this IServiceCollection
4237
// Add PostgreSQL vector store
4338
services.AddPostgresVectorStore(postgresConnectionString);
4439

40+
services.AddAzureOpenAIEmbeddingGenerator(
41+
aiOptions.VectorGenerationDeploymentName,
42+
aiOptions.Endpoint,
43+
aiOptions.ApiKey);
4544
#pragma warning restore SKEXP0010
4645

4746
// Register shared AI services

0 commit comments

Comments
 (0)