### Add Video Generation Example to README Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/docs/AGENTS_UpdateSDK.md Include usage examples for new features in the README.md file. This example demonstrates how to use the video generation API. ```csharp // Video generation example var videoRequest = new QueueVideoRequest { Model = VideoModel.Wan25PreviewTextToVideo, Prompt = "A cat walking on the beach" }; var response = await client.Video.QueueVideoAsync(videoRequest); ``` -------------------------------- ### Run Quickstart Sample Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/README.md Instructions for running the quickstart sample project. This involves navigating to the sample directory, setting the API key using user secrets, and executing the run command. ```bash cd samples/VeniceAI.SDK.Quickstart dotnet user-secrets set "VeniceAI:ApiKey" "your-api-key-here" dotnet run ``` -------------------------------- ### Verify .NET SDK Installation Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/docs/AGENTS_UpdateSDK.md Checks if the correct .NET SDK version is installed on the system. This is a prerequisite for building and testing the SDK. ```bash # Verify .NET 10.0 SDK is installed dotnet --version ``` -------------------------------- ### Install Venice AI .NET SDK Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/README.md Add the VeniceAI.SDK package to your .NET project using the dotnet CLI. ```bash dotnet add package VeniceAI.SDK ``` -------------------------------- ### Quick Start: Initialize and Use Venice AI Client Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/README.md Demonstrates how to set up dependency injection for the Venice AI client and make a basic chat completion request. ```csharp using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using VeniceAI.SDK; using VeniceAI.SDK.Extensions; using VeniceAI.SDK.Models.Chat; var host = Host.CreateDefaultBuilder(args) .ConfigureServices((context, services) => { services.AddVeniceAI(context.Configuration); }) .Build(); var client = host.Services.GetRequiredService(); var request = new ChatCompletionRequest { Model = "llama-3.3-70b", Messages = new List { new UserMessage("Hello! How are you?") }, MaxTokens = 100 }; var response = await client.Chat.CreateChatCompletionAsync(request); Console.WriteLine(response.Choices[0].Message.Content); ``` -------------------------------- ### Create Chat Completion Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/README.md Example of making a chat completion request with system and user messages, specifying model, max tokens, and temperature. ```csharp var request = new ChatCompletionRequest { Model = "llama-3.3-70b", Messages = new List { new SystemMessage("You are a helpful assistant."), new UserMessage("What is the capital of France?") }, MaxTokens = 150, Temperature = 0.7 }; var response = await client.Chat.CreateChatCompletionAsync(request); Console.WriteLine(response.Choices[0].Message.Content); ``` -------------------------------- ### Create New VideoModel Enum Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/docs/AGENTS_UpdateSDK.md Provides a template for creating the `VideoModel` enum if it does not exist in `ModelEnums.cs`. This includes basic structure, description, and an example of adding a model with its ID and name. ```csharp /// /// Available video generation models. /// [JsonConverter(typeof(VideoModelJsonConverter))] public enum VideoModel { /// /// [Description]. /// [JsonStringValue("model-id")] ModelName, } ``` -------------------------------- ### Get Character Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/docs/AGENTS_UpdateSDK.md Retrieves a specific character by its slug. ```APIDOC ## GET /api/v1/characters/{slug} ### Description Retrieves a specific character by its slug. ### Method GET ### Endpoint /api/v1/characters/{slug} ### Parameters #### Path Parameters - **slug** (string) - Required - The unique slug of the character to retrieve. ``` -------------------------------- ### Build Entire Solution Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/docs/AGENTS_UpdateSDK.md Compiles the entire solution, including all projects. This is a comprehensive check to ensure all parts of the SDK and related projects integrate correctly. ```bash # Build the entire solution dotnet build VeniceAI.sln ``` -------------------------------- ### Vision (Image Understanding) Chat Completion Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/README.md Example of a chat completion request that includes an image for analysis using the vision capability. ```csharp var request = new ChatCompletionRequest { Model = "mistral-31-24b", Messages = new List { new UserMessage(new List { new MessageContent { Type = "text", Text = "Describe this image." }, new MessageContent { Type = "image_url", ImageUrl = new ImageUrl { Url = "https://example.com/image.jpg" } } }) }, MaxTokens = 200 }; var response = await client.Chat.CreateChatCompletionAsync(request); ``` -------------------------------- ### Run Integration Tests Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/README.md Instructions for running integration tests, which require a valid API key to be set using user secrets for the integration test project. ```bash dotnet user-secrets set "VeniceAI:ApiKey" "your-api-key" --project tests/VeniceAI.SDK.IntegrationTests dotnet test tests/VeniceAI.SDK.IntegrationTests ``` -------------------------------- ### Generate Image Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/README.md Example of generating an image using the Venice AI API, specifying model, prompt, dimensions, and format, then saving the result. ```csharp var request = new GenerateImageRequest { Model = "hidream", Prompt = "A beautiful sunset over mountains", Width = 1024, Height = 1024, Format = "png" }; var response = await client.Images.GenerateImageAsync(request); var imageBytes = Convert.FromBase64String(response.Data[0].B64Json); await File.WriteAllBytesAsync("output.png", imageBytes); ``` -------------------------------- ### Run Validation Sequence Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/docs/AGENTS_UpdateSDK.md Execute a series of commands to clean, build, and test the project after updating the SDK. This includes checking for build warnings. ```bash # 1. Clean and rebuild dotnet clean VeniceAI.sln dotnet build VeniceAI.sln # 2. Run all tests dotnet test VeniceAI.sln --verbosity normal # 3. Check for warnings dotnet build VeniceAI.sln --verbosity detailed | grep -i warning ``` -------------------------------- ### Build Venice AI SDK Project Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/docs/AGENTS_UpdateSDK.md Compiles the Venice AI SDK project to ensure all dependencies are met and there are no build errors. This should be run before making changes. ```bash # Verify the project builds successfully dotnet build src/VeniceAI.SDK/VeniceAI.SDK.csproj ``` -------------------------------- ### Create Embedding Request Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/README.md Generates an embedding vector for a given text input using a specified model. The output format can be specified, for example, as 'float'. ```csharp var request = new CreateEmbeddingRequest { Model = "text-embedding-bge-m3", Input = "The quick brown fox jumps over the lazy dog", EncodingFormat = "float" }; var response = await client.Embeddings.CreateEmbeddingAsync(request); Console.WriteLine($"Dimensions: {response.Data[0].Embedding.Count}"); ``` -------------------------------- ### Create Video Models Directory Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/docs/AGENTS_UpdateSDK.md Create a new directory for video-related models if the Venice AI API includes video functionality and the directory does not yet exist. This organizes the SDK structure. ```bash mkdir -p src/VeniceAI.SDK/Models/Video ``` -------------------------------- ### Run Unit Tests Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/README.md Command to execute the unit tests for the VeniceAI.SDK project. ```bash dotnet test tests/VeniceAI.SDK.Tests ``` -------------------------------- ### Video Service Implementation Pattern Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/docs/AGENTS_UpdateSDK.md Provides a common pattern for implementing service methods that interact with an HTTP client. This pattern includes logging, making a POST request, ensuring success, and deserializing the JSON response. ```csharp public async Task MethodAsync(RequestType request, CancellationToken cancellationToken = default) { _logger.LogDebug("Calling [endpoint description]..."); var response = await _httpClient.PostAsJsonAsync("api/v1/endpoint", request, cancellationToken); response.EnsureSuccessStatusCode(); var result = await response.Content.ReadFromJsonAsync(cancellationToken: cancellationToken); return result ?? throw new VeniceAIException("Null response from API"); } ``` -------------------------------- ### Initialize New Services in VeniceAIClient Constructor Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/docs/AGENTS_UpdateSDK.md Adds the new service properties to the client implementation and initializes them in the constructor. This ensures that the services are properly instantiated when the client is created. ```csharp /// public IVideoService Video { get; } /// public ICharacterService Characters { get; } // In constructor, add: Video = new VideoService(httpClient, loggerFactory.CreateLogger()); Characters = new CharacterService(httpClient, loggerFactory.CreateLogger()); ``` -------------------------------- ### Run Venice AI SDK Tests Source: https://github.com/michaellucasnzl/venice-ai-api-sdk/blob/main/docs/AGENTS_UpdateSDK.md Executes the test suite for the Venice AI SDK to ensure existing functionality remains intact. This should be run before making changes. ```bash # Verify tests pass before making changes dotnet test tests/VeniceAI.SDK.Tests/VeniceAI.SDK.Tests.csproj ```