using BotSharp.Abstraction.Realtime.Models; namespace BotSharp.Abstraction.MLTasks; public interface IRealTimeCompletion { string Provider { get; } string Model { get; } void SetModelName(string model); Task Connect(RealtimeHubConnection conn, Action onModelReady, Action onModelAudioDeltaReceived, Action onModelAudioResponseDone, Action onAudioTranscriptDone, Action> onModelResponseDone, Action onConversationItemCreated, Action onInputAudioTranscriptionCompleted, Action onUserInterrupted); Task AppenAudioBuffer(string message); Task SendEventToModel(object message); Task Disconnect(); Task CreateSession(Agent agent, List conversations); Task UpdateSession(RealtimeHubConnection conn, bool turnDetection = true); Task InsertConversationItem(RoleDialogModel message); Task RemoveConversationItem(string itemId); Task TriggerModelInference(string? instructions = null); Task CancelModelResponse(); Task> OnResponsedDone(RealtimeHubConnection conn, string response); Task OnConversationItemCreated(RealtimeHubConnection conn, string response); }