### Get started with Azure AI Services Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Learn how to provision, secure, monitor, and deploy Azure AI Services resources to build intelligent solutions. ```Learning path Azure AI Services is a collection of services that are building blocks of AIfunctionality you can integrate into your applications. In this learning path,you'll learn how to provision, secure, monitor, and deploy Azure AI Servicesresources and use them to build intelligent solutions. ``` -------------------------------- ### Example Prompt for Get City Weather Tool Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Example of how to invoke the 'get_city_weather' tool within a prompt. This demonstrates referencing a specific tool by name to get weather information. ```console Using #get_random_weather, what is the weather in Redmond?. ``` -------------------------------- ### Example Prompt with Instructions, Categories, and Cues Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt This prompt shows how to use instructions, supporting content, and cues to guide the AI model's output format. Cues specify nested lists, all-caps categories, and chronological president ordering. ```text prompt = """Instructions: Summarize US Presidential accomplishments, grouped by category. Categories: Domestic Policy, US Economy, Foreign Affairs, Space Exploration. Accomplishments: George WashingtonFirst president of the United States.First president to have been a military veteran.First president to be elected to a second term in office.First president to receive votes from every presidential elector in an election.First president to fill the entire body of the United States federal judges; including the Supreme Court.First president to be declared an honorary citizen of a foreign country, and an honorary citizen of France.John Adams ... /// Text truncatedDOMESTIC POLICY- George Washington: - John Adams:""" ``` -------------------------------- ### Menu Navigation Example Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/68-1990-01_A.txt Demonstrates how to navigate the application's interface using menu selections and button clicks. ```text From the File menu, select New. ``` ```text Click the OK button. ``` -------------------------------- ### Install Required Packages Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Installs necessary packages for the .NET project. This command should be run after navigating into the project directory. ```Bash dotnet add package Microsoft.Extensions.AI ``` -------------------------------- ### Chain of Thought Prompting with Examples (C#) Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Illustrates chain of thought prompting in C# by providing examples that guide the model on how to break down a task and present step-by-step results, including formatting cues. ```csharp prompt= """ Instructions: Compare the pros and cons of EVs and petroleum-fueled vehicles. Differences between EVs and petroleum-fueled vehicles: - Prompt engineering techniques Differences ordered according to overall impact, highest-impact first: 1. Summary of vehicle type differences as pros and cons: Pros of EVs 1. Pros of petroleum-fueled vehicles 1. """ ``` -------------------------------- ### Add OpenAI and Configuration Packages Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Installs necessary NuGet packages for OpenAI integration and configuration management. ```bash dotnet add package Microsoft.Extensions.AI.OpenAI --prerelease dotnet add package Microsoft.Extensions.Configuration dotnet add package Microsoft.Extensions.Configuration.UserSecrets ``` -------------------------------- ### Few-Shot Learning Prompt Example Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt This prompt structure demonstrates few-shot learning by providing explicit examples of user input and desired intent. It helps the model understand specific patterns and produce more accurate, relevant responses, though it increases token count. ```C# prompt = $"""Instructions: What is the intent of this request?If you don't know the intent, don't guess; instead respond with "Unknown".Choices: SendEmail, SendMessage, CompleteTask, CreateDocument, Unknown.User Input: Can you send a very quick approval to the marketing team?Intent: SendMessageUser Input: Can you send the full update to the marketing team?Intent: SendEmailUser Input: {request}Intent:""" ``` -------------------------------- ### Install .NET AI App Templates Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Use the .NET CLI to install the AI app template package. This command is required before creating new AI apps. ```bash dotnet new install Microsoft.Extensions.AI.Templates ``` -------------------------------- ### Install .NET Tool for Evaluation Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Install the Microsoft.Extensions.AI.Evaluation.Console .NET tool globally or locally. This tool is used for running evaluations and generating reports. ```bash dotnet tool install --local Microsoft.Extensions.AI.Evaluation.Console ``` -------------------------------- ### Install PdfPig Package Source: https://github.com/uglytoad/pdfpig/blob/master/docs/index.md Use the NuGet package manager to install the PdfPig library. This command-line instruction is for Package Manager Console. ```csharp Install-Package PdfPig ``` -------------------------------- ### Computer Response Example Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/68-1990-01_A.txt Shows an example of a computer response, including IP address, byte count, time, and TTL. Directory paths are also shown in a specific font. ```text Reply from 208.132.180.48: bytes=32 times=2ms TTL=32 ``` ```text C:\Program Files\Extron ``` -------------------------------- ### Create a new .NET Console App Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Initializes a new .NET console application in a specified directory. Use this command to start a new project. ```.NET CLI dotnet new console -o FunctionCallingAI ``` -------------------------------- ### Add Azure Identity Packages Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Install the necessary Azure Identity packages for your .NET application using the .NET CLI. ```bash dotnet add package Azure.Identity dotnet add package Microsoft.Extensions.Azure ``` -------------------------------- ### Add OpenAI and Configuration Packages for Image Generation Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Installs the necessary NuGet packages for interacting with OpenAI's image generation models and for managing application configuration. ```bash dotnet add package OpenAI dotnet add package Microsoft.Extensions.Configuration ``` -------------------------------- ### Create New MCP Server App Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Creates a new MCP server application named 'SampleMcpServer'. This command requires the MCP Server template to be installed. ```bash dotnet new mcpserver -n SampleMcpServer ``` -------------------------------- ### Create a new .NET console app Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Use the dotnet new command to create a new console application. Ensure you have the .NET 8.0 SDK or higher installed. ```.NET CLI dotnet new console -o ExtensionsAI ``` -------------------------------- ### Initialize OpenAI Clients in C# Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Demonstrates how to create instances of OpenAIClient and AzureOpenAIClient for interacting with OpenAI services. Ensure you replace 'your-api-key' and 'your-azure-openai-endpoint' with your actual credentials. ```csharp using OpenAI; using OpenAI.Assistants; using OpenAI.Files; using Azure.AI.OpenAI; using Azure.Identity; // Create the OpenAI client OpenAIClient openAIClient = new("your-apy-key");// For Azure OpenAI, use the following client instead: AzureOpenAIClient azureAIClient = new( new Uri("your-azure-openai-endpoint"), new DefaultAzureCredential()); #pragma warning disable OPENAI001 AssistantClient assistantClient = openAIClient.GetAssistantClient(); OpenAIFileClient fileClient = openAIClient.GetOpenAIFileClient(); ``` -------------------------------- ### Question Answering in .NET Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt A quickstart article to get an answer and confidence score from a body of text for a given question. ```.NET A quickstart article to get an answer (and confidence score) from a body oftext that you send along with your question. ``` -------------------------------- ### Clone GitHub Repository Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Clone the Azure Data Retrieval Augmented Generation Samples repository to get started. ```bash git clone https://github.com/microsoft/AzureDataRetrievalAugmentedGenerationSamples.git ``` -------------------------------- ### Sample Projects Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Links to various sample projects demonstrating Azure OpenAI Service capabilities. ```APIDOC ## Sample Projects ### .NET OpenAI MCP Agent This sample is an MCP agent app written in .NET, using Azure OpenAI, with a remote MCP server written in TypeScript. ### Get started using GPT-35-Turbo and GPT-4 An article that walks you through creating a chat completion sample. ### Completions A collection of 10 samples that demonstrate how to use the Azure OpenAI client library for .NET to chat, stream replies, use your own data, transcribe/translate audio, generate images, etc. ### Streaming Chat Completions A deep link to the samples demonstrating streaming completions. ### OpenAI with Microsoft Entra ID Role based access control A look at authentication using Microsoft Entra ID. ### OpenAI with Managed Identities An article with more complex security scenarios that require managed identities. ``` -------------------------------- ### Example Command Syntax Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/68-1990-01_A.txt Illustrates the syntax for various commands, including merge scene, set value, and extended commands. Note the use of different fonts for commands, responses, and variables. ```text ^AR Merge Scene,,Op1 scene 1,1 ^B 51 ^W^C[01] R 0004 00300 00400 00800 00600 [02] 35 [17] [03]E X! *X1&* X2)* X2#* X2! CE} ``` ```text ping xxx.xxx.xxx.xxx —t ``` ```text SOH R Data STX Command ETB ETX ``` -------------------------------- ### Get Text Blocks using Default Page Segmenter Source: https://github.com/uglytoad/pdfpig/wiki/Document-Layout-Analysis This is the default method for segmenting a PDF page, which returns a single block containing all words on the page. No special setup is required. ```csharp var blocks = DefaultPageSegmenter.Instance.GetBlocks(words); ``` -------------------------------- ### Create a new .NET Console App Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Use the dotnet new command to initialize a new console application. Navigate into the created directory. ```bash dotnet new console -o VectorDataAI cd VectorDataAI ``` -------------------------------- ### Configure Dockerfile for Font Installation Source: https://github.com/uglytoad/pdfpig/wiki/FAQ Sets up a Dockerfile to install essential TTF fonts and font configuration tools. It includes steps to update package lists, install specific font packages, update the font cache, and verify the installation of Liberation fonts. ```bash # 🧩 Install necessary TTF fonts (PdfPig will use them) RUN apt-get update && \ apt-get install -y --no-install-recommends \ fontconfig \ fonts-dejavu \ fonts-liberation \ fonts-liberation2 && \ fc-cache -fv && \ # Verify Liberation fonts installed, fail build if not found fc-list | grep -i liberation || (echo "Liberation fonts not found!" && exit 1) && \ rm -rf /var/lib/apt/lists/* ``` -------------------------------- ### Initialize Chat Client and Configure Tools Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Sets up the AI chat client, configures function invocation, and defines a tool for getting weather information. The function includes logic, name, and description for the AI model. ```csharp using Microsoft.Extensions.AI; using Microsoft.Extensions.Configuration; using OpenAI; IConfigurationRoot config = new ConfigurationBuilder().AddUserSecrets().Build(); string? model = config["ModelName"]; string? key = config["OpenAIKey"]; IChatClient client = new ChatClientBuilder(new OpenAIClient(key).GetChatClient(model ?? "gpt-4o").AsIChatClient()) .UseFunctionInvocation() .Build(); // Add a new plugin with a local .NET function // that should be available to the AI model. var chatOptions = new ChatOptions { Tools = [AIFunctionFactory.Create((string location, string unit) => { // Here you would call a weather API // to get the weather for the location. return "Periods of rain or drizzle, 15 C"; }, "get_current_weather", "Get the current weather in a given location")] }; ``` -------------------------------- ### Create .NET Console App and Add OpenAI Package Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Steps to create a new .NET console application and add the OpenAI package using the .NET CLI. ```bash dotnet new console -o AIAssistant dotnet package add OpenAI --prerelease ``` -------------------------------- ### Add Semantic Kernel to a .NET project Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Install the Microsoft.SemanticKernel NuGet package using the .NET CLI. Additional capabilities may require installing other packages. ```bash dotnet add package Microsoft.SemanticKernel ``` ```bash dotnet package add Microsoft.SemanticKernel ``` -------------------------------- ### Create a Simple PDF Document Source: https://github.com/uglytoad/pdfpig/blob/master/README.md Creates a new PDF document with a single page containing the text "Hello World!". Standard 14 fonts must be registered with the document builder before use. ```csharp PdfDocumentBuilder builder = new PdfDocumentBuilder(); PdfPageBuilder page = builder.AddPage(PageSize.A4); // Fonts must be registered with the document builder prior to use to prevent duplication. PdfDocumentBuilder.AddedFont font = builder.AddStandard14Font(Standard14Font.Helvetica); page.AddText("Hello World!", 12, new PdfPoint(25, 700), font); byte[] documentBytes = builder.Build(); File.WriteAllBytes(@"C:\\git\\newPdf.pdf", documentBytes); ``` -------------------------------- ### Get insight about your data from an .NET Azure AI chat app Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Use Semantic Kernel or Azure OpenAI SDK to get analytics and information about your data. ```.NET Use Semantic Kernel or Azure OpenAI SDK to get analytics andinformation about your data. ``` -------------------------------- ### Pack and publish to NuGet Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Commands to pack your project into a NuGet package and publish it to a NuGet repository. Ensure you replace placeholders with your specific package ID, version, and API key. ```bash dotnet pack -c Release dotnet nuget push bin/Release/*.nupkg --api-key --source https://api.nuget.org/v3/index.json ``` -------------------------------- ### Install Ollama and Pull Model in Bash Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Installs Ollama locally and pulls the 'phi3:mini' model from the Ollama registry. This is a prerequisite for running a local AI model. ```bash ollama pull phi3:mini ``` -------------------------------- ### Add NuGet Packages Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Install the required NuGet packages for Azure OpenAI, Azure Identity, and Microsoft Extensions AI. Use the --prerelease flag for packages that are in preview. ```bash dotnet add package Azure.AI.OpenAI --prerelease dotnet add package Azure.Identity dotnet add package Microsoft.Extensions.AI dotnet add package Microsoft.Extensions.AI.OpenAI --prerelease dotnet add package ModelContextProtocol --prerelease ``` -------------------------------- ### Install TTF Fonts on Linux Source: https://github.com/uglytoad/pdfpig/wiki/FAQ Installs necessary TTF fonts on a Linux system to ensure consistent text rendering in PdfPig. This command is useful for environments where default fonts might be missing. ```bash sudo apt install ttf* ``` -------------------------------- ### Sample IChatClient Implementation Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Provides a sample implementation of the IChatClient interface for interacting with AI chat services. This class demonstrates the general structure and includes a placeholder for response generation. ```csharp using System.Runtime.CompilerServices; using Microsoft.Extensions.AI; public sealed class SampleChatClient(Uri endpoint, string modelId) : IChatClient { public ChatClientMetadata Metadata { get; } = new(nameof(SampleChatClient), endpoint, modelId); public async Task GetResponseAsync( IEnumerable chatMessages, ChatOptions? options = null, CancellationToken cancellationToken = default) { // Simulate some operation. await Task.Delay(300, cancellationToken); // Return a sample chat completion response randomly. string[] responses = [ "This is the first sample response.", "Here is another example of a response message.", "This is yet another response message." ]; var random = new Random(); var responseMessage = responses[random.Next(responses.Length)]; return new ChatResponse { Message = responseMessage }; } } // Dummy implementations for required types to make the example compile public record ChatClientMetadata(string Name, Uri Endpoint, string ModelId); public record ChatResponse { public string Message { get; set; } } public record ChatMessage(ChatRole Role, string Content); public enum ChatRole { User, Assistant, System } public class ChatOptions {} public interface IChatClient { Task GetResponseAsync(IEnumerable chatMessages, ChatOptions? options = null, CancellationToken cancellationToken = default); ChatClientMetadata Metadata { get; } } ``` -------------------------------- ### Zero-Shot Learning Prompt Example Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt This prompt structure is used for zero-shot learning, where the model must infer the intent from the provided input based on its pre-existing knowledge. It's useful for tasks like intent classification without explicit examples. ```C# prompt = $"""Instructions: What is the intent of this request?If you don't know the intent, don't guess; instead respond with "Unknown".Choices: SendEmail, SendMessage, CompleteTask, CreateDocument, Unknown.User Input: {request}Intent: """ ``` -------------------------------- ### Configure System Prompt and Chat Options Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt This method sets up a system prompt for an AI assistant focused on astronomy, instructing it to keep responses concise and use imperial measurements. It then defines chat messages and options for interacting with the chat client. ```csharp private static async Task<(IList Messages, ChatResponse ModelResponse)> GetAstronomyConversationAsync( IChatClient chatClient, string astronomyQuestion) { const string SystemPrompt = """ You're an AI assistant that can answer questions related to astronomy. Keep your responses concise and under 100 words. Use the imperial measurement system for all measurements in your response. """; IList messages = [ new ChatMessage(ChatRole.System, SystemPrompt), new ChatMessage(ChatRole.User, astronomyQuestion) ]; var chatOptions = new ChatOptions { ``` -------------------------------- ### Build PdfPig Project Source: https://github.com/uglytoad/pdfpig/blob/master/CONTRIBUTING.md Commands to restore dependencies and build the PdfPig project from the 'src' directory using the .NET CLI. ```bash dotnet restore dotnet build ``` -------------------------------- ### Get Page Size Source: https://github.com/uglytoad/pdfpig/blob/master/README.md Retrieve the page size and check if it matches a specific PageSize enum value. ```cs PageSize size = Page.Size; bool isA4 = size == PageSize.A4; ``` -------------------------------- ### Add Azure OpenAI Package Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Install the Azure.AI.OpenAI NuGet package to your project to work with Azure OpenAI Service. ```bash dotnet add package Azure.AI.OpenAI ``` -------------------------------- ### Add OpenAI and Configuration Packages Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Install necessary NuGet packages for OpenAI integration and application configuration. Ensure you are using the latest stable versions or pre-release versions if required. ```bash dotnet add package OpenAIdotnet add package Microsoft.Extensions.AI.OpenAI --prereleasedotnet add package Microsoft.Extensions.Configurationdotnet add package Microsoft.Extensions.Configuration.UserSecrets ``` -------------------------------- ### Example Prompt with Instructions and Categories Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt This prompt demonstrates how to instruct an AI model to summarize presidential accomplishments and group them by specified categories. It includes sample data and category definitions. ```text prompt = """Instructions: Summarize US Presidential accomplishments, grouped by category. Categories: Domestic Policy, US Economy, Foreign Affairs, Space Exploration. Accomplishments: 'George Washington- First president of the United States.- First president to have been a military veteran.- First president to be elected to a second term in office.- Received votes from every presidential elector in an election.- Filled the entire body of the United States federal judges; including the Supreme Court.- First president to be declared an honorary citizen of a foreign country, and an honorary citizen of France.John Adams ...' ///Text truncated""" ``` -------------------------------- ### Get Images from Page Source: https://github.com/uglytoad/pdfpig/blob/master/README.md Retrieve PDF image objects present on the page. For more details, consult the wiki on Images. ```cs IEnumerable images = page.GetImages(); ``` -------------------------------- ### Create and Execute a Plan with SequentialPlanner in C# Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Configures and creates a sequential plan to read a file and summarize its content using both native and semantic functions. Ensure the 'assets' folder and file exist. ```csharp // Native function definition and kernel configuration code omitted for brevity // Configure and create the plan string planDefinition = "Read content from a local file and summarize the content."; SequentialPlanner sequentialPlanner = new SequentialPlanner(kernel); string assetsFolder = @"../../assets"; string fileName = Path.Combine(assetsFolder,"docs","06_SemanticKernel", "aci_documentation.txt"); ContextVariables contextVariables = new ContextVariables(); contextVariables.Add("fileName", fileName); var customPlan = await sequentialPlanner.CreatePlanAsync(planDefinition); // Execute the plan KernelResult kernelResult = await kernel.RunAsync(contextVariables, customPlan); Console.WriteLine($"Summarization: {kernelResult.GetValue()}"); ``` -------------------------------- ### Example BlocklistItem JSON Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt This JSON represents a blocklist item, including its pattern and whether it's a regular expression. ```json { "name": "raiBlocklistItemName", "id": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/raiBlocklists/raiBlocklistName/raiBlocklistItems/raiBlocklistItemName", "properties": { "pattern": "blocking pattern", "isRegex": false } } ``` -------------------------------- ### Create .NET Console App Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Use the dotnet new command to create a new console application. Navigate into the project directory afterward. ```bash dotnet new console -n MCPHostApp cd MCPHostApp ``` -------------------------------- ### Document Translation in .NET Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt A quickstart article on using Document Translation to translate documents while preserving structure and formatting. ```.NET A quickstart article that details how to use Document Translation totranslate a source document into a target language while preservingstructure and text formatting. ``` -------------------------------- ### Create a .NET Console App Source: https://github.com/uglytoad/pdfpig/blob/master/src/UglyToad.PdfPig.Tests/Integration/Documents/dotnet-ai.txt Use the dotnet new command to create a new .NET console application in an empty directory. This is the initial step for building your AI assistant. ```.NET CLI dotnet new console -o "MyAssistant" cd "MyAssistant" ```