using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using xAiApi.AI.Configuration;
using xAiApi.AI.Models.Entities;
using xAiModels.Models;
using xIdentityModels.Models;
using xModels.Dtos;
namespace xAiApi.AI.Interfaces
{
///
/// Provide Ai Capabilities Using AI Service ...
/// using User Data Info ...
///
public interface IXAiProvider
{
///
/// Configuration ...
///
///
public XAiApiConfiguration Configuration { get; }
//
#region Helpers ...
///
/// Converts Entity to Dto ...
///
///
///
///
///
Task ToDto(
XAiProject entity,
CancellationToken cancellationToken = default
);
///
/// Converts Entity to Dto ...
///
///
///
///
///
Task ToDto(
XAiMessage entity,
CancellationToken cancellationToken = default
);
///
/// Converts Entity to Dto ...
///
///
///
///
///
Task ToDto(
XAiConversation entity,
CancellationToken cancellationToken = default
);
///
/// Converts a List of Entities to Dtos ...
///
///
///
///
///
Task> ToDtos(
IEnumerable entities,
CancellationToken cancellationToken = default
);
///
/// Converts a List of Entities to Dtos ...
///
///
///
///
///
Task> ToDtos(
IEnumerable entities,
CancellationToken cancellationToken = default
);
///
/// Converts a List of Entities to Dtos ...
///
///
///
///
///
Task> ToDtos(
IEnumerable entities,
CancellationToken cancellationToken = default
);
///
/// Converts a QueryResult of Entities to Dtos ...
///
///
///
///
///
Task> ToDtoQueryResult(
XQueryResult queryResult,
CancellationToken cancellationToken = default
);
///
/// Converts a QueryResult of Entities to Dtos ...
///
///
///
///
///
Task> ToDtoQueryResult(
XQueryResult queryResult,
CancellationToken cancellationToken = default
);
///
/// Converts a QueryResult of Entities to Dtos ...
///
///
///
///
///
Task> ToDtoQueryResult(
XQueryResult queryResult,
CancellationToken cancellationToken = default
);
///
/// Check Permission for Ai Actions ...
///
///
///
///
///
Task HasPermission(
string projectId = null,
XUserClaimsInfoDto userInfo = null,
CancellationToken cancellationToken = default
);
///
/// Prepare Prompt ...
///
///
///
///
///
///
Task PreparePrompt(
string prompt,
string projectId = null,
XUserClaimsInfoDto userInfo = null,
CancellationToken cancellationToken = default
);
#endregion
///
/// Ask a Question ...
///
///
///
///
///
///
///
Task Ask(
string prompt,
string projectId = null,
string conversationId = null,
XUserClaimsInfoDto userInfo = null,
CancellationToken cancellationToken = default
);
}
}