34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace xAiApi.Interfaces
|
|
{
|
|
public interface IXAiEmbeddingServiceControllerBase : IXAiServiceControllerBase
|
|
{
|
|
/// <summary>
|
|
/// Request For Embedding Specified String ...
|
|
/// </summary>
|
|
/// <param name="content"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("Embedding")]
|
|
Task<ActionResult<float[]>> Embedding(
|
|
[FromQuery] string content,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
|
|
/// <summary>
|
|
/// Request For Embedding Specified Batch ...
|
|
/// </summary>
|
|
/// <param name="batch"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("Embeddings")]
|
|
Task<ActionResult<IReadOnlyList<float[]>>> Embeddings(
|
|
[FromQuery] string[] batch,
|
|
CancellationToken cancellationToken = default
|
|
);
|
|
}
|
|
} |