From ce5225ad8555786fb605ab264498861c92e6fb4c Mon Sep 17 00:00:00 2001 From: Konstantin S Date: Tue, 3 Dec 2024 04:02:44 +0400 Subject: [PATCH] test: Fixed. --- .github/workflows/mkdocs.yml | 9 +++---- .../Tests.CreatePredictionForFluxPro.cs | 24 +++++++++---------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml index 064fa24..1c4e91a 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yml @@ -32,9 +32,6 @@ jobs: - name: Setup Pages uses: actions/configure-pages@v5 - - name: Install dependencies - run: pip install mkdocs-material - - name: Setup .NET uses: actions/setup-dotnet@v4 with: @@ -44,7 +41,11 @@ jobs: run: dotnet run --project src/helpers/GenerateDocs/GenerateDocs.csproj . - name: Build with MkDocs - run: mkdocs build -d ./_site + run: | + python -m venv myenv + source myenv/bin/activate + pip install mkdocs-material + mkdocs build -d ./_site - name: Upload artifact uses: actions/upload-pages-artifact@v3 diff --git a/src/tests/Replicate.IntegrationTests/Tests.CreatePredictionForFluxPro.cs b/src/tests/Replicate.IntegrationTests/Tests.CreatePredictionForFluxPro.cs index 411afef..55f318d 100755 --- a/src/tests/Replicate.IntegrationTests/Tests.CreatePredictionForFluxPro.cs +++ b/src/tests/Replicate.IntegrationTests/Tests.CreatePredictionForFluxPro.cs @@ -8,18 +8,15 @@ public async Task CreatePredictionForFluxPro() using var api = GetAuthorizedApi(); var response = await api.ModelsPredictionsCreateAsync( - input: new PredictionRequestInput + input: new Dictionary { - AdditionalProperties = new Dictionary - { - ["seed"] = Random.Shared.Next(0, 1000000), - ["steps"] = 25, - ["prompt"] = "a female, european, young adult, fit body, wavy acid orange hair, wearing open swimsuit, sea in the background.", - ["guidance"] = 3.5, - ["interval"] = 3, - ["aspect_ratio"] = "16:9", - ["safety_tolerance"] = 5, - }, + ["seed"] = Random.Shared.Next(0, 1000000), + ["steps"] = 25, + ["prompt"] = "a female, european, young adult, fit body, wavy acid orange hair, wearing open swimsuit, sea in the background.", + ["guidance"] = 3.5, + ["interval"] = 3, + ["aspect_ratio"] = "16:9", + ["safety_tolerance"] = 5, }, modelOwner: "black-forest-labs", modelName: "flux-pro", @@ -31,8 +28,9 @@ public async Task CreatePredictionForFluxPro() var endResponse = await response.WaitUntilSuccessfulAsync(api); - Console.WriteLine($@"Seed: {endResponse.Input?.Seed}. -Image available at:\n{endResponse.Output}"); + Console.WriteLine($"Seed: {endResponse.Input?.Seed}."); + Console.WriteLine("Image available at:"); + Console.WriteLine(endResponse.Output); //// ![output](https://raw.githubusercontent.com/tryAGI/Replicate/dd1e5c2cbebc53e9b343f1372e5a660159e79ef3/assets/output.webp) }