using System; using System.Collections.Generic; using System.Net.Http; using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.AI; namespace xAiApi.Interfaces { /// /// Describe a Base Service Actions of any Ai Based Services ... /// public interface IAIServiceBase : IDisposable { /// /// Base Method for Communicate with LLM ... /// /// /// /// Task AskAsync( string prompt, CancellationToken cancellationToken = default ); /// /// Base Method for Communicate with LLM ... /// /// /// /// IAsyncEnumerable AskAsEnumerable( string prompt, CancellationToken cancellationToken = default ); /// /// Get LLM Client instance for Communicating with LLM ... /// /// /// IChatClient GetClient(string llm = null); /// /// Create Custom HttpClient for Communicating with LLM API ... /// /// /// HttpClient GetHttpClient(string url = null); /// /// Prepare a Message History List for LLM Communication based on Prompt ... /// /// /// /// IList GetHistory( string prompt = null, bool forcePrompt = true ); /// /// Prepare a Message History List for LLM Communication based on Prompt ... /// /// /// /// IList GetHistory( ChatMessage message = null, bool forceMessage = true ); } }