using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.AI;
using Microsoft.SemanticKernel.ChatCompletion;
using xAiApi.AI.Configuration;
namespace xAiApi.AI.Interfaces
{
public interface IXAIService
{
///
/// Provides Options for Chat ...
///
///
ChatOptions ChatOptions { get; }
///
/// Provides History for Chat ...
///
///
ChatHistory ChatHistory { get; }
///
/// a Client for Text Chat ...
///
///
IChatClient TextGenreatorClient { get; }
///
/// a Client for Code Chat ...
///
///
IChatClient CodeGenreatorClient { get; }
///
/// a Client for Image Chats ...
///
///
IChatClient ImageGenreatorClient { get; }
///
/// Configuration ...
///
///
XAiApiConfiguration Configuration { get; }
//
#region Actions ...
///
/// Generated Text ...
///
///
///
///
Task GetTextResponseAsync(
string prompt,
CancellationToken cancellationToken = default
);
///
/// Generated Response ...
///
///
///
///
Task GetResponseAsync(
string prompt,
CancellationToken cancellationToken = default
);
///
/// Generated Response ...
///
/// ChatMessage instance
///
///
Task GetResponseByChatMessageAsync(
ChatMessage message,
CancellationToken cancellationToken = default
);
///
/// Generated Response ...
///
/// ChatMessage Enumerable instance
///
///
Task GetResponseByChatMessagesAsync(
IEnumerable messages,
CancellationToken cancellationToken = default
);
///
/// Generate Text Response Stream ...
///
///
///
///
IAsyncEnumerable GetReponseStreamAsync(
string prompt,
CancellationToken cancellationToken = default
);
///
/// Generate Text Response Stream ...
///
///
///
///
IAsyncEnumerable GetTextReponseStreamAsync(
string prompt,
CancellationToken cancellationToken = default
);
#endregion
}
}