Table of Contents

Interface IAIRunService

Namespace
Mythosia.AI.Services
Assembly
Mythosia.AI.Abstractions.dll

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

message Message
onText Action<string>
options StreamOptions
context AIRequestContext
cancellationToken CancellationToken

Returns

Task<AIRun>

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

prompt string
onText Action<string>
options StreamOptions
context AIRequestContext
cancellationToken CancellationToken

Returns

Task<AIRun>