Class AIRunServiceExtensions
- Namespace
- Mythosia.AI.Extensions
- Assembly
- Mythosia.AI.Abstractions.dll
Access to optional run support through an IAIService reference.
public static class AIRunServiceExtensions
- Inheritance
-
AIRunServiceExtensions
- Inherited Members
Methods
StartRunAsync(IAIService, Message, Action<string>?, StreamOptions?, AIRequestContext?, CancellationToken)
Starts a message run, or rejects a service that does not implement IAIRunService.
public static Task<AIRun> StartRunAsync(this IAIService service, Message message, Action<string>? onText = null, StreamOptions? options = null, AIRequestContext? context = null, CancellationToken cancellationToken = default)
Parameters
serviceIAIServicemessageMessageonTextAction<string>optionsStreamOptionscontextAIRequestContextcancellationTokenCancellationToken
Returns
StartRunAsync(IAIService, string, Action<string>?, StreamOptions?, AIRequestContext?, CancellationToken)
Starts a run, or rejects a service that does not implement IAIRunService.
public static Task<AIRun> StartRunAsync(this IAIService service, string prompt, Action<string>? onText = null, StreamOptions? options = null, AIRequestContext? context = null, CancellationToken cancellationToken = default)
Parameters
serviceIAIServicepromptstringonTextAction<string>optionsStreamOptionscontextAIRequestContextcancellationTokenCancellationToken