@@ -412,10 +412,6 @@ void AddDbContext(DbContextOptionsBuilder options)
412412 Endpoint = appSettings . AI . OpenAI . EmbeddingEndpoint ,
413413 Transport = new HttpClientPipelineTransport ( sp . GetRequiredService < IHttpClientFactory > ( ) . CreateClient ( "AI" ) )
414414 } ) . AsIEmbeddingGenerator ( ) )
415- . ConfigureOptions ( options =>
416- {
417- configuration . GetRequiredSection ( "AI:EmbeddingOptions" ) . Bind ( options ) ;
418- } )
419415 . UseLogging ( )
420416 . UseOpenTelemetry ( ) ;
421417 // .UseDistributedCache()
@@ -428,10 +424,6 @@ void AddDbContext(DbContextOptionsBuilder options)
428424 {
429425 Transport = new Azure . Core . Pipeline . HttpClientTransport ( sp . GetRequiredService < IHttpClientFactory > ( ) . CreateClient ( "AI" ) )
430426 } ) . AsIEmbeddingGenerator ( appSettings . AI . AzureOpenAI . EmbeddingModel ) )
431- . ConfigureOptions ( options =>
432- {
433- configuration . GetRequiredSection ( "AI:EmbeddingOptions" ) . Bind ( options ) ;
434- } )
435427 . UseLogging ( )
436428 . UseOpenTelemetry ( ) ;
437429 // .UseDistributedCache()
@@ -442,10 +434,6 @@ void AddDbContext(DbContextOptionsBuilder options)
442434 new Uri ( appSettings . AI . HuggingFace . EmbeddingEndpoint ) ,
443435 apiKey : appSettings . AI . HuggingFace . EmbeddingApiKey ,
444436 httpClient : sp . GetRequiredService < IHttpClientFactory > ( ) . CreateClient ( "AI" ) , loggerFactory : sp . GetRequiredService < ILoggerFactory > ( ) ) )
445- . ConfigureOptions ( options =>
446- {
447- configuration . GetRequiredSection ( "AI:EmbeddingOptions" ) . Bind ( options ) ;
448- } )
449437 . UseLogging ( )
450438 . UseOpenTelemetry ( ) ;
451439 // .UseDistributedCache()
@@ -454,10 +442,6 @@ void AddDbContext(DbContextOptionsBuilder options)
454442 {
455443 services . AddEmbeddingGenerator ( sp => new LocalTextEmbeddingGenerationService ( )
456444 . AsEmbeddingGenerator ( ) )
457- . ConfigureOptions ( options =>
458- {
459- configuration . GetRequiredSection ( "AI:EmbeddingOptions" ) . Bind ( options ) ;
460- } )
461445 . UseLogging ( )
462446 . UseOpenTelemetry ( ) ;
463447 // .UseDistributedCache()
0 commit comments