Class DefaultImageGenerationService
Implements
Inherited Members
Namespace: Glitch9.AIDevKit
Assembly: Glitch9.AIDevKit.dll
Syntax
public sealed class DefaultImageGenerationService : GenerativeServiceBase, IImageGenerationService, IGenerativeService<string, IImageAsset, IImageGenerationOptions>, IStreamingImageGenerationService, IImageGeneration, IStreamingGenerativeService<string, Delta<IImageChunk>, IImageAsset, IImageGenerationOptions>, IDisposable
Methods
| Edit this page View SourceGenerateAsync(string, IImageGenerationOptions, CancellationToken)
Generates a final output asynchronously.
Declaration
public UniTask<Generated<IImageAsset>> GenerateAsync(string input, IImageGenerationOptions @params, CancellationToken ct = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | input | The input data. |
| IImageGenerationOptions | params | |
| CancellationToken | ct | The cancellation token. |
Returns
| Type | Description |
|---|---|
| UniTask<Generated<IImageAsset>> | The generated result. |
StreamAsync(string, IImageGenerationOptions, CancellationToken)
Starts a streaming generation request asynchronously.
Declaration
public UniTask<IGenerativeStream<Delta<IImageChunk>, IImageAsset>> StreamAsync(string input, IImageGenerationOptions @params, CancellationToken ct = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | input | The input data. |
| IImageGenerationOptions | params | |
| CancellationToken | ct | The cancellation token. |
Returns
| Type | Description |
|---|---|
| UniTask<IGenerativeStream<Delta<IImageChunk>, IImageAsset>> | A stream handle that emits deltas and eventually provides the final output. |