Skip to content

Conversation

@DrHazemAli
Copy link
Contributor

Added a console application demonstrating video generation using the AzureSoraSDK NuGet package, complementing the existing REST API sample (VideoGeneration-AzureSora-01).

This sample provides developers with a production-ready starting point for integrating Azure SORA video generation into their .NET applications, using AzureSoraSDK package.

@github-actions
Copy link

👋 Thanks for contributing @DrHazemAli! We will review the pull request and get back to you soon.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a new .NET 8.0 console sample demonstrating how to generate and download videos using the AzureSoraSDK, both with direct SDK calls and via dependency injection.

  • Introduce a new .csproj with required package references for AzureSoraSDK and Microsoft Extensions.
  • Implement Program.cs with two examples: basic SDK usage and DI-hosted usage.
  • Provide user-secret configuration, job submission, polling, and download logic.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
VideoGeneration-AzureSoraSDK-02.csproj New project file targeting .NET 8.0 with necessary NuGet packages.
Program.cs Console app with two sample flows: direct SDK calls and DI-based service.

string apiKey = configuration["api_key"] ?? "your-api-key";
string deploymentName = configuration["deployment_name"] ?? "sora";

if (string.IsNullOrWhiteSpace(apiKey) || apiKey == "your-api-key")
Copy link

Copilot AI Jun 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code only validates the API key placeholder but not the endpoint or deployment name. Consider extending this check to also verify that endpoint and deploymentName have been set to non-default values to avoid runtime errors.

Suggested change
if (string.IsNullOrWhiteSpace(apiKey) || apiKey == "your-api-key")
if (string.IsNullOrWhiteSpace(apiKey) || apiKey == "your-api-key" ||
string.IsNullOrWhiteSpace(endpoint) || endpoint == "https://your-resource.openai.azure.com" ||
string.IsNullOrWhiteSpace(deploymentName) || deploymentName == "sora")

Copilot uses AI. Check for mistakes.
@elbruno elbruno merged commit f15bc22 into microsoft:main Jun 10, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants