last works on AiApi:
- Default Ai Service and Controller; - Default Embeding and Controller; - ...
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using OllamaSharp;
|
||||
|
||||
namespace xAiApi.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Base Embedding Provider Service ...
|
||||
/// </summary>
|
||||
public interface IXAiEmbeddingServiceBase : IXAiServiceBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Embedding Specified String ...
|
||||
/// </summary>
|
||||
/// <param name="content"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<float[]> Embeding(
|
||||
string content,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Embedding Specified Batch ...
|
||||
/// </summary>
|
||||
/// <param name="batch"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<IReadOnlyList<float[]>> Embedings(
|
||||
string[] batch,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Access Embedding Client ...
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
OllamaApiClient GetEmbeddingClient();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user