BotSharp/src/Infrastructure/BotSharp.Abstraction/MLTasks/ITextEmbedding.cs
xbotter 114fa98616
🔧 Update ITextEmbedding interface and its implementations
- Update ITextEmbedding interface to use async methods for getting vectors
- Update KnowledgeService to use async methods for getting vectors
- Update TextEmbeddingProvider and fastTextEmbeddingProvider to use async methods for getting vectors
- Update IntentClassifier to use async methods for getting vectors
- Update SemanticKernelTextEmbeddingProvider to use async methods for getting vectors
2023-11-16 21:37:53 +08:00

11 lines
237 B
C#

using System.Threading;
namespace BotSharp.Abstraction.MLTasks;
public interface ITextEmbedding
{
int Dimension { get; }
Task<float[]> GetVectorAsync(string text);
Task<List<float[]>> GetVectorsAsync(List<string> texts);
}