Skip to content

Commit

Permalink
RavenDB-23556 more renames
Browse files Browse the repository at this point in the history
  • Loading branch information
ppekrol committed Jan 26, 2025
1 parent a7d23b5 commit 92ed83f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
using System;
using System.Diagnostics.CodeAnalysis;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Connectors.Onnx;
using Microsoft.SemanticKernel.Embeddings;
using Raven.Client.Documents.Operations.ETL.AI;
using Raven.Server.Documents.Indexes.VectorSearch;

#pragma warning disable SKEXP0070

namespace Raven.Server.Documents.ETL.Providers.AI;
namespace Raven.Server.Documents.ETL.Providers.AI.Extensions;

public static class AiExtensions
{
Expand Down Expand Up @@ -37,4 +43,17 @@ public static EmbeddingPoolingMode ToEmbeddingPoolingMode(this OnnxEmbeddingPool
throw new ArgumentOutOfRangeException(nameof(poolingMode), poolingMode, null);
}
}

[Experimental("SKEXP0070")]
public static IKernelBuilder AddCustomBertOnnxTextEmbeddingGeneration(
this IKernelBuilder builder,
BertOnnxOptions options = null,
string serviceId = null)
{
builder.Services.AddKeyedSingleton<ITextEmbeddingGenerationService>(
serviceId,
GenerateEmbeddings.CreateTextEmbeddingGenerationService(options));

return builder;
}
}

This file was deleted.

0 comments on commit 92ed83f

Please sign in to comment.