-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5ad180
commit 8d58ab8
Showing
3 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
namespace BotNet.Services.Stability.Skills { | ||
public sealed class ImageVariationBot( | ||
StabilityClient stabilityClient | ||
) { | ||
private readonly StabilityClient _stabilityClient = stabilityClient; | ||
|
||
public async Task<byte[]> ModifyImageAsync( | ||
byte[] image, | ||
string prompt, | ||
CancellationToken cancellationToken | ||
) { | ||
return await _stabilityClient.ModifyImageAsync( | ||
engine: "stable-diffusion-xl-1024-v1-0", | ||
promptImage: image, | ||
promptText: prompt, | ||
cancellationToken: cancellationToken | ||
); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters