last ...
This commit is contained in:
@@ -1,28 +1,84 @@
|
||||
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
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides Options for Chat ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
ChatOptions ChatOptions { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides History for Chat ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
ChatHistory ChatHistory { get; }
|
||||
|
||||
/// <summary>
|
||||
/// a Client for Text Chat ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
IChatClient TextGenreatorClient { get; }
|
||||
|
||||
/// <summary>
|
||||
/// a Client for Code Chat ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
IChatClient CodeGenreatorClient { get; }
|
||||
|
||||
/// <summary>
|
||||
/// a Client for Image Chats ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
IChatClient ImageGenreatorClient { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Configuration ...
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
XAiApiConfiguration Configuration { get; }
|
||||
|
||||
//
|
||||
#region Actions ...
|
||||
/// <summary>
|
||||
/// Generated Text ...
|
||||
/// </summary>
|
||||
/// <param name="prompt"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<string> GetTextResponseAsync(string prompt);
|
||||
Task<string> GetTextResponseAsync(
|
||||
string prompt,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Generated Response ...
|
||||
/// </summary>
|
||||
/// <param name="prompt"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<ChatResponse> GetResponseAsync(string prompt);
|
||||
Task<ChatResponse> GetResponseAsync(
|
||||
string prompt,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Generate Text Response Stream ...
|
||||
/// </summary>
|
||||
/// <param name="prompt"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
IAsyncEnumerable<ChatResponseUpdate> GetTextReponseStreamAsync(
|
||||
string prompt,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user