Interface IAIRunService
Optional capability for starting observable, controllable requests.
public interface IAIRunService
Remarks
Existing IAIService implementations do not need to implement this interface. Streaming options select observed output and do not disable registered tool execution.
Methods
StartRunAsync(Message, Action<string>?, StreamOptions?, AIRequestContext?, CancellationToken)
Starts a message request and returns its handle before the final result is available.
Task<AIRun> StartRunAsync(Message message, Action<string>? onText = null, StreamOptions? options = null, AIRequestContext? context = null, CancellationToken cancellationToken = default)
Parameters
messageMessageonTextAction<string>optionsStreamOptionscontextAIRequestContextcancellationTokenCancellationToken
Returns
StartRunAsync(string, Action<string>?, StreamOptions?, AIRequestContext?, CancellationToken)
Starts execution and returns its handle before the final result is available.
Task<AIRun> StartRunAsync(string prompt, Action<string>? onText = null, StreamOptions? options = null, AIRequestContext? context = null, CancellationToken cancellationToken = default)
Parameters
promptstringonTextAction<string>optionsStreamOptionscontextAIRequestContextcancellationTokenCancellationToken