PSOpenAI-Help.xml

<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh">
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>ConvertFrom-Token</command:name>
      <command:verb>ConvertFrom</command:verb>
      <command:noun>Token</command:noun>
      <maml:description>
        <maml:para>Decode tokens to original text.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Decode tokens to original text.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>ConvertFrom-Token</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none">
          <maml:name>Token</maml:name>
          <maml:description>
            <maml:para>Specifies the token array to be decoded.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32[]</command:parameterValue>
          <dev:type>
            <maml:name>Int32[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="1" aliases="none">
          <maml:name>Encoding</maml:name>
          <maml:description>
            <maml:para>Specifies the encoding name. Accepted values are `cl100k_base`, `p50k_base`, `p50k_edit`, `r50k_base`, `gpt2`.
It cannot be specified with the model name.</maml:para>
          </maml:description>
          <command:parameterValueGroup>
            <command:parameterValue required="false" command:variableLength="false">cl100k_base</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">p50k_base</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">p50k_edit</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">r50k_base</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">gpt2</command:parameterValue>
          </command:parameterValueGroup>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>cl100k_base</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>AsArray</maml:name>
          <maml:description>
            <maml:para>If set, output as an array of strings decoded token by token.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>ConvertFrom-Token</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none">
          <maml:name>Token</maml:name>
          <maml:description>
            <maml:para>Specifies the token array to be decoded.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32[]</command:parameterValue>
          <dev:type>
            <maml:name>Int32[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="1" aliases="none">
          <maml:name>Model</maml:name>
          <maml:description>
            <maml:para>Specifies the model name. such like `gpt-4` or `text-davinci-003`.
It cannot be specified with the encoding name.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>AsArray</maml:name>
          <maml:description>
            <maml:para>If set, output as an array of strings decoded token by token.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none">
        <maml:name>Token</maml:name>
        <maml:description>
          <maml:para>Specifies the token array to be decoded.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32[]</command:parameterValue>
        <dev:type>
          <maml:name>Int32[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="1" aliases="none">
        <maml:name>Encoding</maml:name>
        <maml:description>
          <maml:para>Specifies the encoding name. Accepted values are `cl100k_base`, `p50k_base`, `p50k_edit`, `r50k_base`, `gpt2`.
It cannot be specified with the model name.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>cl100k_base</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="1" aliases="none">
        <maml:name>Model</maml:name>
        <maml:description>
          <maml:para>Specifies the model name. such like `gpt-4` or `text-davinci-003`.
It cannot be specified with the encoding name.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>AsArray</maml:name>
        <maml:description>
          <maml:para>If set, output as an array of strings decoded token by token.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>System.Int32[]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.String</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- Example 1 --------------------------</maml:title>
        <dev:code>$Tokens = (9906, 11, 1917, 0)
ConvertFrom-Token -Token $Tokens -Model 'gpt-4'
# Output: Hello, world!</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- Example 2 --------------------------</maml:title>
        <dev:code>(8582, 235, 230, 8582, 235, 240, 8582, 235, 239) | ConvertFrom-Token -Encoding 'p50k_base'
# Output: 🍈🍒🍑</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/ConvertFrom-Token.md</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://github.com/openai/tiktoken</maml:linkText>
        <maml:uri>https://github.com/openai/tiktoken</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>ConvertTo-Token</command:name>
      <command:verb>ConvertTo</command:verb>
      <command:noun>Token</command:noun>
      <maml:description>
        <maml:para>BPE tokeniser for use with OpenAI's models.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Encode text to tokens for use with OpenAI's models. (tokenize)
The output values are compatible with OpenAI tiktoken.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>ConvertTo-Token</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none">
          <maml:name>Text</maml:name>
          <maml:description>
            <maml:para>Specifies texts to be encoded.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="1" aliases="none">
          <maml:name>Encoding</maml:name>
          <maml:description>
            <maml:para>Specifies the encoding name. Accepted values are `cl100k_base`, `p50k_base`, `p50k_edit`, `r50k_base`, `gpt2`.
It cannot be specified with the model name.</maml:para>
          </maml:description>
          <command:parameterValueGroup>
            <command:parameterValue required="false" command:variableLength="false">cl100k_base</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">p50k_base</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">p50k_edit</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">r50k_base</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">gpt2</command:parameterValue>
          </command:parameterValueGroup>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>cl100k_base</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>ConvertTo-Token</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none">
          <maml:name>Text</maml:name>
          <maml:description>
            <maml:para>Specifies texts to be encoded.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="1" aliases="none">
          <maml:name>Model</maml:name>
          <maml:description>
            <maml:para>Specifies the model name. such like `gpt-4` or `text-davinci-003`.
It cannot be specified with the encoding name.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none">
        <maml:name>Text</maml:name>
        <maml:description>
          <maml:para>Specifies texts to be encoded.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="1" aliases="none">
        <maml:name>Encoding</maml:name>
        <maml:description>
          <maml:para>Specifies the encoding name. Accepted values are `cl100k_base`, `p50k_base`, `p50k_edit`, `r50k_base`, `gpt2`.
It cannot be specified with the model name.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>cl100k_base</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="1" aliases="none">
        <maml:name>Model</maml:name>
        <maml:description>
          <maml:para>Specifies the model name. such like `gpt-4` or `text-davinci-003`.
It cannot be specified with the encoding name.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>System.String</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.Int32[]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- Example 1 --------------------------</maml:title>
        <dev:code>$Text = Hello, world!
ConvertTo-Token -Text $Text -Model 'gpt-4'
# Output: (9906, 11, 1917, 0)</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- Example 2 --------------------------</maml:title>
        <dev:code>'🍈🍒🍑' | ConvertTo-Token -Encoding 'p50k_base'
# Output: (8582, 235, 230, 8582, 235, 240, 8582, 235, 239)</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/ConvertTo-Token.md</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://github.com/openai/tiktoken</maml:linkText>
        <maml:uri>https://github.com/openai/tiktoken</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Enter-ChatGPT</command:name>
      <command:verb>Enter</command:verb>
      <command:noun>ChatGPT</command:noun>
      <maml:description>
        <maml:para>Communicate with ChatGPT interactively on the console.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Communicate with ChatGPT interactively on the console.
This command will wait for user input on the terminal. You type your question to ChatGPT and press Enter twice to send the question and see the answer from ChatGPT. You may then ask additional questions.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Enter-ChatGPT</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Model</maml:name>
          <maml:description>
            <maml:para>The name of model to use. The default value is `gpt-3.5-turbo`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>gpt-3.5-turbo</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="system">
          <maml:name>RolePrompt</maml:name>
          <maml:description>
            <maml:para>An optional text to set the behavior of the assistant.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Temperature</maml:name>
          <maml:description>
            <maml:para>What sampling temperature to use, between `0` and `2`.
Higher values like `0.8` will make the output more random, while lower values like `0.2` will make it more focused and deterministic.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="top_p">
          <maml:name>TopP</maml:name>
          <maml:description>
            <maml:para>An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
So `0.1` means only the tokens comprising the top `10%` probability mass are considered.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="stop">
          <maml:name>StopSequence</maml:name>
          <maml:description>
            <maml:para>Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
          <dev:type>
            <maml:name>String[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="max_tokens">
          <maml:name>MaxTokens</maml:name>
          <maml:description>
            <maml:para>The maximum number of tokens allowed for the generated answer.
The max value is `4096`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="presence_penalty">
          <maml:name>PresencePenalty</maml:name>
          <maml:description>
            <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="frequency_penalty">
          <maml:name>FrequencyPenalty</maml:name>
          <maml:description>
            <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
          <maml:name>Organization</maml:name>
          <maml:description>
            <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>NoHeader</maml:name>
          <maml:description>
            <maml:para>Suppresses the display of header strings</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Model</maml:name>
        <maml:description>
          <maml:para>The name of model to use. The default value is `gpt-3.5-turbo`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>gpt-3.5-turbo</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="system">
        <maml:name>RolePrompt</maml:name>
        <maml:description>
          <maml:para>An optional text to set the behavior of the assistant.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Temperature</maml:name>
        <maml:description>
          <maml:para>What sampling temperature to use, between `0` and `2`.
Higher values like `0.8` will make the output more random, while lower values like `0.2` will make it more focused and deterministic.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="top_p">
        <maml:name>TopP</maml:name>
        <maml:description>
          <maml:para>An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
So `0.1` means only the tokens comprising the top `10%` probability mass are considered.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="stop">
        <maml:name>StopSequence</maml:name>
        <maml:description>
          <maml:para>Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
        <dev:type>
          <maml:name>String[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="max_tokens">
        <maml:name>MaxTokens</maml:name>
        <maml:description>
          <maml:para>The maximum number of tokens allowed for the generated answer.
The max value is `4096`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="presence_penalty">
        <maml:name>PresencePenalty</maml:name>
        <maml:description>
          <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="frequency_penalty">
        <maml:name>FrequencyPenalty</maml:name>
        <maml:description>
          <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>TimeoutSec</maml:name>
        <maml:description>
          <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>MaxRetryCount</maml:name>
        <maml:description>
          <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
        <maml:name>ApiKey</maml:name>
        <maml:description>
          <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
        <maml:name>Organization</maml:name>
        <maml:description>
          <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>NoHeader</maml:name>
        <maml:description>
          <maml:para>Suppresses the display of header strings</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.Object</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- Example 1 --------------------------</maml:title>
        <dev:code>PS C:\&gt; Enter-ChatGPT -ApiKey 'YOUR_OPENAI_APIKEY' -NoHeader</dev:code>
        <dev:remarks>
          <maml:para>! Interactive Chat (/Docs/images/InteractiveChat.gif)</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/Enter-ChatGPT.md</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Get-AzureOpenAIDeployments</command:name>
      <command:verb>Get</command:verb>
      <command:noun>AzureOpenAIDeployments</command:noun>
      <maml:description>
        <maml:para>Gets the list of deployments owned by the Azure OpenAI resource.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Gets the list of deployments owned by the Azure OpenAI resource.
https://learn.microsoft.com/en-us/rest/api/cognitiveservices/azureopenaistable/deployments/list</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Get-AzureOpenAIDeployments</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="Engine, id">
          <maml:name>Deployment</maml:name>
          <maml:description>
            <maml:para>The identifier of the deployment. If not specified, lists all available deployments.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiBase</maml:name>
          <maml:description>
            <maml:para>Specifies yhe name of your Azure OpenAI resource endpoint such like: `https://{your-resource-name}.openai.azure.com/`
If not specified, it will try to use `$global:OPENAI_API_BASE` or `$env:OPENAI_API_BASE`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">System.Uri</command:parameterValue>
          <dev:type>
            <maml:name>System.Uri</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiVersion</maml:name>
          <maml:description>
            <maml:para>The API version to use for this operation.
The default value is `2023-03-15-preview`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>"2023-03-15-preview"</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>AuthType</maml:name>
          <maml:description>
            <maml:para>Specifies the authentication type.
You can choose from `azure` or `azure_ad`.
The default value is `azure`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>"azure"</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="Engine, id">
        <maml:name>Deployment</maml:name>
        <maml:description>
          <maml:para>The identifier of the deployment. If not specified, lists all available deployments.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiBase</maml:name>
        <maml:description>
          <maml:para>Specifies yhe name of your Azure OpenAI resource endpoint such like: `https://{your-resource-name}.openai.azure.com/`
If not specified, it will try to use `$global:OPENAI_API_BASE` or `$env:OPENAI_API_BASE`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">System.Uri</command:parameterValue>
        <dev:type>
          <maml:name>System.Uri</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiVersion</maml:name>
        <maml:description>
          <maml:para>The API version to use for this operation.
The default value is `2023-03-15-preview`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>"2023-03-15-preview"</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiKey</maml:name>
        <maml:description>
          <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>AuthType</maml:name>
        <maml:description>
          <maml:para>Specifies the authentication type.
You can choose from `azure` or `azure_ad`.
The default value is `azure`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>"azure"</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>TimeoutSec</maml:name>
        <maml:description>
          <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>MaxRetryCount</maml:name>
        <maml:description>
          <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>[pscustomobject]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------- Example 1: List all depoloyments. --------------</maml:title>
        <dev:code>PS C:\&gt; $global:OPENAI_API_KEY = '&lt;Put your api key here&gt;'
PS C:\&gt; $global:OPENAI_API_BASE = 'https://&lt;resource-name&gt;.openai.azure.com/'
PS C:\&gt; Get-AzureOpenAIDeployments | select -ExpandProperty id
 
deployment-afa0669ca01e4693ae3a93baf40f26d6
deployment-d09c49daeccc4ee5a5a9cd9aacc640c5
deployment-706f763eb09b45d1b179e42128974cd4
...</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>------- Example 2: Get specific deployment information. -------</maml:title>
        <dev:code>PS C:\&gt; Get-AzureOpenAIDeployments -Deployment "deployment-d09c49daeccc4ee5a5a9cd9aacc640c5"
 
scale_settings : @{scale_type=standard}
model : gpt-35-turbo
owner : organization-owner
id : deployment-706f763eb09b45d1b179e42128974cd4
status : succeeded
object : deployment
created_at : 2023/04/21 10:09:33
updated_at : 2023/04/21 10:09:33</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/Enter-ChatGPT.md</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Get-AzureOpenAIModels</command:name>
      <command:verb>Get</command:verb>
      <command:noun>AzureOpenAIModels</command:noun>
      <maml:description>
        <maml:para>Lists the currently available models.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Gets a list of all models that are accessible by the Azure OpenAI resource. These include base models as well as all successfully completed fine-tuned models owned by the Azure OpenAI resource.
https://learn.microsoft.com/en-us/rest/api/cognitiveservices/azureopenaistable/models/list</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Get-AzureOpenAIModels</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="Model, ID">
          <maml:name>Name</maml:name>
          <maml:description>
            <maml:para>Specifies the model name which you wish to get.
If not specified, lists all available models.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiBase</maml:name>
          <maml:description>
            <maml:para>Specifies yhe name of your Azure OpenAI resource endpoint such like: `https://{your-resource-name}.openai.azure.com/`
If not specified, it will try to use `$global:OPENAI_API_BASE` or `$env:OPENAI_API_BASE`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">System.Uri</command:parameterValue>
          <dev:type>
            <maml:name>System.Uri</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiVersion</maml:name>
          <maml:description>
            <maml:para>The API version to use for this operation.
The default value is `2023-03-15-preview`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>"2023-03-15-preview"</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="Model, ID">
        <maml:name>Name</maml:name>
        <maml:description>
          <maml:para>Specifies the model name which you wish to get.
If not specified, lists all available models.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>TimeoutSec</maml:name>
        <maml:description>
          <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>MaxRetryCount</maml:name>
        <maml:description>
          <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiBase</maml:name>
        <maml:description>
          <maml:para>Specifies yhe name of your Azure OpenAI resource endpoint such like: `https://{your-resource-name}.openai.azure.com/`
If not specified, it will try to use `$global:OPENAI_API_BASE` or `$env:OPENAI_API_BASE`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">System.Uri</command:parameterValue>
        <dev:type>
          <maml:name>System.Uri</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiVersion</maml:name>
        <maml:description>
          <maml:para>The API version to use for this operation.
The default value is `2023-03-15-preview`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>"2023-03-15-preview"</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiKey</maml:name>
        <maml:description>
          <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>[pscustomobject]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>------------ Example 1: List all available models. ------------</maml:title>
        <dev:code>PS C:\&gt; $global:OPENAI_API_KEY = '&lt;Put your api key here&gt;'
PS C:\&gt; $global:OPENAI_API_BASE = 'https://&lt;resource-name&gt;.openai.azure.com/'
PS C:\&gt; Get-AzureOpenAIModels | select -ExpandProperty ID
 
text-curie-001
text-davinci-001
text-davinci-002
gpt-35-turbo
...</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>---------- Example 2: Get specific model information. ----------</maml:title>
        <dev:code>PS C:\&gt; Get-AzureOpenAIModels -Name "gpt-35-turbo"
 
capabilities : @{fine_tune=False; ...
lifecycle_status : preview
deprecation : @{inference=1690848000}
id : gpt-35-turbo
status : succeeded
object : model
created_at : 2023/03/09 9:00:00
updated_at : 2023/03/09 9:00:00</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/Get-AzureOpenAIModels.md</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://learn.microsoft.com/en-us/rest/api/cognitiveservices/azureopenaistable/models/list</maml:linkText>
        <maml:uri>https://learn.microsoft.com/en-us/rest/api/cognitiveservices/azureopenaistable/models/list</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Get-CosineSimilarity</command:name>
      <command:verb>Get</command:verb>
      <command:noun>CosineSimilarity</command:noun>
      <maml:description>
        <maml:para>Calculate cosine similarity between two vectors.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Calculate cosine similarity between two vectors.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Get-CosineSimilarity</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="0" aliases="none">
          <maml:name>Vector1</maml:name>
          <maml:description>
            <maml:para>First vector</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double[]</command:parameterValue>
          <dev:type>
            <maml:name>Double[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="1" aliases="none">
          <maml:name>Vector2</maml:name>
          <maml:description>
            <maml:para>Second vector. The dimension is must same as first vector.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double[]</command:parameterValue>
          <dev:type>
            <maml:name>Double[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="0" aliases="none">
        <maml:name>Vector1</maml:name>
        <maml:description>
          <maml:para>First vector</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double[]</command:parameterValue>
        <dev:type>
          <maml:name>Double[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="1" aliases="none">
        <maml:name>Vector2</maml:name>
        <maml:description>
          <maml:para>Second vector. The dimension is must same as first vector.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double[]</command:parameterValue>
        <dev:type>
          <maml:name>Double[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.Double</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- Example 1 --------------------------</maml:title>
        <dev:code>PS C:\&gt; $v1 = (-0.01302161, -0.01999075, 0.007301898)
PS C:\&gt; $v2 = (0.01506045, -0.04311577, 0.01272033)
PS C:\&gt; Get-CosineSimilarity $v1 $v2
0.00144161334877118</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/Get-CosineSimilarity.md</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Get-OpenAIModels</command:name>
      <command:verb>Get</command:verb>
      <command:noun>OpenAIModels</command:noun>
      <maml:description>
        <maml:para>Lists the currently available models.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Lists the currently available models, and provides basic information about each one such as the owner and availability.
You can refer to the Models documentation to understand what models are available and the differences between them.
https://platform.openai.com/docs/api-reference/models/list</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Get-OpenAIModels</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="Model, ID">
          <maml:name>Name</maml:name>
          <maml:description>
            <maml:para>Specifies the model name which you wish to get.
If not specified, lists all available models.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
          <maml:name>Organization</maml:name>
          <maml:description>
            <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="Model, ID">
        <maml:name>Name</maml:name>
        <maml:description>
          <maml:para>Specifies the model name which you wish to get.
If not specified, lists all available models.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>TimeoutSec</maml:name>
        <maml:description>
          <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>MaxRetryCount</maml:name>
        <maml:description>
          <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>ApiKey</maml:name>
        <maml:description>
          <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
        <maml:name>Organization</maml:name>
        <maml:description>
          <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>[pscustomobject]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>------------ Example 1: List all available models. ------------</maml:title>
        <dev:code>PS C:\&gt; Get-OpenAIModels | select -ExpandProperty ID
 
babbage
davinci
gpt-3.5-turbo-0301
text-davinci-003
...</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>---------- Example 2: Get specific model information. ----------</maml:title>
        <dev:code>PS C:\&gt; Get-OpenAIModels -Name "gpt-3.5-turbo"
 
id : gpt-3.5-turbo
object : model
owned_by : openai
permission : {@{id=modelperm-QvbW9EnkbwPtWZu...
root : gpt-3.5-turbo
parent :
created : 2023/02/28 18:56:42</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/Get-OpenAIModels.md</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/api-reference/models/list</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/api-reference/models/list</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>New-AzureOpenAIDeployments</command:name>
      <command:verb>New</command:verb>
      <command:noun>AzureOpenAIDeployments</command:noun>
      <maml:description>
        <maml:para>Creates a new deployment for the Azure OpenAI resource according to the given specification.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Creates a new deployment for the Azure OpenAI resource according to the given specification.
https://learn.microsoft.com/en-us/rest/api/cognitiveservices/azureopenaistable/deployments/create</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>New-AzureOpenAIDeployments</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="none">
          <maml:name>Model</maml:name>
          <maml:description>
            <maml:para>The OpenAI model identifier (model-id) to deploy.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ScaleType</maml:name>
          <maml:description>
            <maml:para>Defines how scaling operations will be executed.</maml:para>
          </maml:description>
          <command:parameterValueGroup>
            <command:parameterValue required="false" command:variableLength="false">standard</command:parameterValue>
            <command:parameterValue required="false" command:variableLength="false">manual</command:parameterValue>
          </command:parameterValueGroup>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>"standard"</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ScaleCapacity</maml:name>
          <maml:description>
            <maml:para>The constant reserved capacity of the inference endpoint for this deployment. This parameter is effenctive only when the `-ScaleType` as `manual`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiBase</maml:name>
          <maml:description>
            <maml:para>Specifies yhe name of your Azure OpenAI resource endpoint such like: `https://{your-resource-name}.openai.azure.com/`
If not specified, it will try to use `$global:OPENAI_API_BASE` or `$env:OPENAI_API_BASE`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">System.Uri</command:parameterValue>
          <dev:type>
            <maml:name>System.Uri</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiVersion</maml:name>
          <maml:description>
            <maml:para>The API version to use for this operation.
The default value is `2023-03-15-preview`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>"2023-03-15-preview"</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>AuthType</maml:name>
          <maml:description>
            <maml:para>Specifies the authentication type.
You can choose from `azure` or `azure_ad`.
The default value is `azure`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>"azure"</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="none">
        <maml:name>Model</maml:name>
        <maml:description>
          <maml:para>The OpenAI model identifier (model-id) to deploy.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ScaleType</maml:name>
        <maml:description>
          <maml:para>Defines how scaling operations will be executed.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>"standard"</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ScaleCapacity</maml:name>
        <maml:description>
          <maml:para>The constant reserved capacity of the inference endpoint for this deployment. This parameter is effenctive only when the `-ScaleType` as `manual`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>1</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiBase</maml:name>
        <maml:description>
          <maml:para>Specifies yhe name of your Azure OpenAI resource endpoint such like: `https://{your-resource-name}.openai.azure.com/`
If not specified, it will try to use `$global:OPENAI_API_BASE` or `$env:OPENAI_API_BASE`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">System.Uri</command:parameterValue>
        <dev:type>
          <maml:name>System.Uri</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiVersion</maml:name>
        <maml:description>
          <maml:para>The API version to use for this operation.
The default value is `2023-03-15-preview`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>"2023-03-15-preview"</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiKey</maml:name>
        <maml:description>
          <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>AuthType</maml:name>
        <maml:description>
          <maml:para>Specifies the authentication type.
You can choose from `azure` or `azure_ad`.
The default value is `azure`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>"azure"</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>TimeoutSec</maml:name>
        <maml:description>
          <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>MaxRetryCount</maml:name>
        <maml:description>
          <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>[pscustomobject]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------- Example 1: Creating a deployment. --------------</maml:title>
        <dev:code>PS C:\&gt; $global:OPENAI_API_KEY = '&lt;Put your api key here&gt;'
PS C:\&gt; $global:OPENAI_API_BASE = 'https://&lt;resource-name&gt;.openai.azure.com/'
PS C:\&gt; New-AzureOpenAIDeployments -Model text-davinci-002
 
scale_settings : @{scale_type=standard}
model : text-davinci-002
owner : organization-owner
id : deployment-afa0669ca01e4693ae3a93baf40f26d6
status : succeeded
object : deployment
created_at : 2023/04/28 12:53:27
updated_at : 2023/04/28 12:53:27</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/New-AzureOpenAIDeployments.md</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Remove-AzureOpenAIDeployments</command:name>
      <command:verb>Remove</command:verb>
      <command:noun>AzureOpenAIDeployments</command:noun>
      <maml:description>
        <maml:para>Deletes the deployment specified by the given deployment-id.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Deletes the deployment specified by the given deployment-id.
https://learn.microsoft.com/en-us/rest/api/cognitiveservices/azureopenaistable/deployments/delete</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Remove-AzureOpenAIDeployments</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="Engine, id">
          <maml:name>Deployment</maml:name>
          <maml:description>
            <maml:para>The name (id) of the deployment for deleting.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiBase</maml:name>
          <maml:description>
            <maml:para>Specifies yhe name of your Azure OpenAI resource endpoint such like: `https://{your-resource-name}.openai.azure.com/`
If not specified, it will try to use `$global:OPENAI_API_BASE` or `$env:OPENAI_API_BASE`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">System.Uri</command:parameterValue>
          <dev:type>
            <maml:name>System.Uri</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiVersion</maml:name>
          <maml:description>
            <maml:para>The API version to use for this operation.
The default value is `2023-03-15-preview`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>"2023-03-15-preview"</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>AuthType</maml:name>
          <maml:description>
            <maml:para>Specifies the authentication type.
You can choose from `azure` or `azure_ad`.
The default value is `azure`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>"azure"</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="cf">
          <maml:name>Confirm</maml:name>
          <maml:description>
            <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Force</maml:name>
          <maml:description>
            <maml:para>Supress prompts for confirmation.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="wi">
          <maml:name>WhatIf</maml:name>
          <maml:description>
            <maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="Engine, id">
        <maml:name>Deployment</maml:name>
        <maml:description>
          <maml:para>The name (id) of the deployment for deleting.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiBase</maml:name>
        <maml:description>
          <maml:para>Specifies yhe name of your Azure OpenAI resource endpoint such like: `https://{your-resource-name}.openai.azure.com/`
If not specified, it will try to use `$global:OPENAI_API_BASE` or `$env:OPENAI_API_BASE`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">System.Uri</command:parameterValue>
        <dev:type>
          <maml:name>System.Uri</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiVersion</maml:name>
        <maml:description>
          <maml:para>The API version to use for this operation.
The default value is `2023-03-15-preview`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>"2023-03-15-preview"</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiKey</maml:name>
        <maml:description>
          <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>AuthType</maml:name>
        <maml:description>
          <maml:para>Specifies the authentication type.
You can choose from `azure` or `azure_ad`.
The default value is `azure`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>"azure"</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>TimeoutSec</maml:name>
        <maml:description>
          <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>MaxRetryCount</maml:name>
        <maml:description>
          <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="cf">
        <maml:name>Confirm</maml:name>
        <maml:description>
          <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Force</maml:name>
        <maml:description>
          <maml:para>Supress prompts for confirmation.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="wi">
        <maml:name>WhatIf</maml:name>
        <maml:description>
          <maml:para>Shows what would happen if the cmdlet runs. The cmdlet is not run.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes>
      <command:inputType>
        <dev:type>
          <maml:name>System.String</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:inputType>
    </command:inputTypes>
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>System.Void</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>--------------- Example 1: Delete a deployment. ---------------</maml:title>
        <dev:code>PS C:\&gt; $global:OPENAI_API_KEY = '&lt;Put your api key here&gt;'
PS C:\&gt; $global:OPENAI_API_BASE = 'https://&lt;resource-name&gt;.openai.azure.com/'
PS C:\&gt; Remove-AzureOpenAIDeployments -Deployment 'deployment-afa0669ca01e4693ae3a93baf40f26d6'</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>--------- Example 2: Specifies a target from pipeline. ---------</maml:title>
        <dev:code>PS C:\&gt; Get-AzureOpenAIDeployments -Deployment 'deployment-afa0669ca01e4693ae3a93baf40f26d6' | Remove-AzureOpenAIDeployments -Force</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/Remove-AzureOpenAIDeployments.md</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Request-AudioTranscription</command:name>
      <command:verb>Request</command:verb>
      <command:noun>AudioTranscription</command:noun>
      <maml:description>
        <maml:para>Transcribes audio into the input language.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Transcribes audio into the input language.
https://platform.openai.com/docs/guides/speech-to-text/speech-to-text</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Request-AudioTranscription</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none">
          <maml:name>File</maml:name>
          <maml:description>
            <maml:para>(Required) The audio file to transcribe, in one of these formats: `mp3`, `mp4`, `mpeg`, `mpga`, `m4a`, `wav`, or `webm`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Model</maml:name>
          <maml:description>
            <maml:para>The name of model to use. The default value is `whisper-1`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>whisper-1</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Prompt</maml:name>
          <maml:description>
            <maml:para>An optional text to guide the model's style or continue a previous audio segment.
The prompt should match the audio language.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="response_format">
          <maml:name>Format</maml:name>
          <maml:description>
            <maml:para>The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.
The default value is `text`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>text</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Temperature</maml:name>
          <maml:description>
            <maml:para>The sampling temperature, between `0` and `1`.
Higher values like `0.8` will make the output more random, while lower values like `0.2` will make it more focused and deterministic.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Language</maml:name>
          <maml:description>
            <maml:para>The language of the input audio.
Supplying the input language in `ISO-639-1` format will improve accuracy and latency.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
          <maml:name>Organization</maml:name>
          <maml:description>
            <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none">
        <maml:name>File</maml:name>
        <maml:description>
          <maml:para>(Required) The audio file to transcribe, in one of these formats: `mp3`, `mp4`, `mpeg`, `mpga`, `m4a`, `wav`, or `webm`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Model</maml:name>
        <maml:description>
          <maml:para>The name of model to use. The default value is `whisper-1`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>whisper-1</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Prompt</maml:name>
        <maml:description>
          <maml:para>An optional text to guide the model's style or continue a previous audio segment.
The prompt should match the audio language.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="response_format">
        <maml:name>Format</maml:name>
        <maml:description>
          <maml:para>The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.
The default value is `text`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>text</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Temperature</maml:name>
        <maml:description>
          <maml:para>The sampling temperature, between `0` and `1`.
Higher values like `0.8` will make the output more random, while lower values like `0.2` will make it more focused and deterministic.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Language</maml:name>
        <maml:description>
          <maml:para>The language of the input audio.
Supplying the input language in `ISO-639-1` format will improve accuracy and latency.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>TimeoutSec</maml:name>
        <maml:description>
          <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>MaxRetryCount</maml:name>
        <maml:description>
          <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
        <maml:name>ApiKey</maml:name>
        <maml:description>
          <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
        <maml:name>Organization</maml:name>
        <maml:description>
          <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>[string]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>------------------- Example 1: Audio-to-Text -------------------</maml:title>
        <dev:code>PS C:\&gt; Request-AudioTranscription -File C:\sample\audio.mp3 -Format text
 
Hello, I am david.</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/Request-AudioTranscription.md</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/guides/speech-to-text/speech-to-text</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/guides/speech-to-text/speech-to-text</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/api-reference/audio/create</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/api-reference/audio/create</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Request-AudioTranslation</command:name>
      <command:verb>Request</command:verb>
      <command:noun>AudioTranslation</command:noun>
      <maml:description>
        <maml:para>Translates audio into English.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Translates audio into English.
https://platform.openai.com/docs/guides/speech-to-text/speech-to-text</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Request-AudioTranslation</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none">
          <maml:name>File</maml:name>
          <maml:description>
            <maml:para>(Required) The audio file to translate, in one of these formats: `mp3`, `mp4`, `mpeg`, `mpga`, `m4a`, `wav`, or `webm`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Model</maml:name>
          <maml:description>
            <maml:para>The name of model to use. The default value is `whisper-1`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>whisper-1</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Prompt</maml:name>
          <maml:description>
            <maml:para>An optional text to guide the model's style or continue a previous audio segment.
The prompt should be in English.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="response_format">
          <maml:name>Format</maml:name>
          <maml:description>
            <maml:para>The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.
The default value is `text`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>text</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Temperature</maml:name>
          <maml:description>
            <maml:para>The sampling temperature, between `0` and `1`.
Higher values like `0.8` will make the output more random, while lower values like `0.2` will make it more focused and deterministic.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
          <maml:name>Organization</maml:name>
          <maml:description>
            <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none">
        <maml:name>File</maml:name>
        <maml:description>
          <maml:para>(Required) The audio file to translate, in one of these formats: `mp3`, `mp4`, `mpeg`, `mpga`, `m4a`, `wav`, or `webm`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Model</maml:name>
        <maml:description>
          <maml:para>The name of model to use. The default value is `whisper-1`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>whisper-1</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Prompt</maml:name>
        <maml:description>
          <maml:para>An optional text to guide the model's style or continue a previous audio segment.
The prompt should be in English.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="response_format">
        <maml:name>Format</maml:name>
        <maml:description>
          <maml:para>The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.
The default value is `text`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>text</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Temperature</maml:name>
        <maml:description>
          <maml:para>The sampling temperature, between `0` and `1`.
Higher values like `0.8` will make the output more random, while lower values like `0.2` will make it more focused and deterministic.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>TimeoutSec</maml:name>
        <maml:description>
          <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>MaxRetryCount</maml:name>
        <maml:description>
          <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
        <maml:name>ApiKey</maml:name>
        <maml:description>
          <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
        <maml:name>Organization</maml:name>
        <maml:description>
          <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>[string]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>--------- Example 1: Japanese speech to English text. ---------</maml:title>
        <dev:code>Request-AudioTranslation -File C:\sample\japanese.mp3 -Format text
 
Hello, My name is tanaka yoshio.</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/Request-AudioTranslation.md</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/guides/speech-to-text/speech-to-text</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/guides/speech-to-text/speech-to-text</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/api-reference/audio/create</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/api-reference/audio/create</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Request-AzureChatCompletion</command:name>
      <command:verb>Request</command:verb>
      <command:noun>AzureChatCompletion</command:noun>
      <maml:description>
        <maml:para>Creates a completion for the chat message.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Creates a completion for the chat message by Azure OpenAI Service.
https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference?source=recommendations#chat-completions</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Request-AzureChatCompletion</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="1" aliases="Text">
          <maml:name>Message</maml:name>
          <maml:description>
            <maml:para>The messages to generate chat completions.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Name</maml:name>
          <maml:description>
            <maml:para>The name of the author of this message.
This is an optional field, and may contain a-z, A-Z, 0-9, hyphens, and underscores, with a maximum length of 64 characters.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Engine">
          <maml:name>Deployment</maml:name>
          <maml:description>
            <maml:para>The deployment name you chose when you deployed the model.
Deployments must be created in Azure Portal in advance.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="system">
          <maml:name>RolePrompt</maml:name>
          <maml:description>
            <maml:para>An optional text to set the behavior of the assistant.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
          <dev:type>
            <maml:name>String[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Temperature</maml:name>
          <maml:description>
            <maml:para>What sampling temperature to use, between `0` and `2`.
Higher values like `0.8` will make the output more random, while lower values like `0.2` will make it more focused and deterministic.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="top_p">
          <maml:name>TopP</maml:name>
          <maml:description>
            <maml:para>An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
So `0.1` means only the tokens comprising the top `10%` probability mass are considered.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="n">
          <maml:name>NumberOfAnswers</maml:name>
          <maml:description>
            <maml:para>How many chat completion choices to generate for each input message.
The default value is `1`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
          <dev:type>
            <maml:name>UInt16</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Stream</maml:name>
          <maml:description>
            <maml:para>If set, partial message deltas will be sent, like in ChatGPT.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="stop">
          <maml:name>StopSequence</maml:name>
          <maml:description>
            <maml:para>Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
          <dev:type>
            <maml:name>String[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="max_tokens">
          <maml:name>MaxTokens</maml:name>
          <maml:description>
            <maml:para>The maximum number of tokens allowed for the generated answer.
Maximum value depends on model. (`4096` for `gpt-3.5-turbo` or `8192` for `gpt-4`)</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="presence_penalty">
          <maml:name>PresencePenalty</maml:name>
          <maml:description>
            <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="frequency_penalty">
          <maml:name>FrequencyPenalty</maml:name>
          <maml:description>
            <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="logit_bias">
          <maml:name>LogitBias</maml:name>
          <maml:description>
            <maml:para>Modify the likelihood of specified tokens appearing in the completion.
Accepts a maps of tokens to an associated bias value from `-100` to `100`. You can use `ConvertTo-Token` to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between `-1` and `1` should decrease or increase likelihood of selection; values like `-100` or `100` should result in a ban or exclusive selection of the relevant token.
As an example, you can pass like so: `@{23182 = 20; 88847 = -100}`
ID 23182 maps to "apple" and ID 88847 maps to "banana". Thus, this example increases the likelihood of the word "apple" being included in the response from the AI and greatly reduces the likelihood of the word "banana" being included.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">IDictionary</command:parameterValue>
          <dev:type>
            <maml:name>IDictionary</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>User</maml:name>
          <maml:description>
            <maml:para>A unique identifier representing for your end-user. This will help Azure OpenAI monitor and detect abuse.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiBase</maml:name>
          <maml:description>
            <maml:para>Specifies yhe name of your Azure OpenAI resource endpoint such like: `https://{your-resource-name}.openai.azure.com/`
If not specified, it will try to use `$global:OPENAI_API_BASE` or `$env:OPENAI_API_BASE`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">System.Uri</command:parameterValue>
          <dev:type>
            <maml:name>System.Uri</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiVersion</maml:name>
          <maml:description>
            <maml:para>The API version to use for this operation.
The default value is `2023-03-15-preview`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>"2023-03-15-preview"</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>AuthType</maml:name>
          <maml:description>
            <maml:para>Specifies the authentication type.
You can choose from `azure` or `azure_ad`.
The default value is `azure`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>"azure"</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="none">
          <maml:name>History</maml:name>
          <maml:description>
            <maml:para>An object for keeping the conversation history.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
          <dev:type>
            <maml:name>Object[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="1" aliases="Text">
        <maml:name>Message</maml:name>
        <maml:description>
          <maml:para>The messages to generate chat completions.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Name</maml:name>
        <maml:description>
          <maml:para>The name of the author of this message.
This is an optional field, and may contain a-z, A-Z, 0-9, hyphens, and underscores, with a maximum length of 64 characters.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Engine">
        <maml:name>Deployment</maml:name>
        <maml:description>
          <maml:para>The deployment name you chose when you deployed the model.
Deployments must be created in Azure Portal in advance.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="system">
        <maml:name>RolePrompt</maml:name>
        <maml:description>
          <maml:para>An optional text to set the behavior of the assistant.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
        <dev:type>
          <maml:name>String[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Temperature</maml:name>
        <maml:description>
          <maml:para>What sampling temperature to use, between `0` and `2`.
Higher values like `0.8` will make the output more random, while lower values like `0.2` will make it more focused and deterministic.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="top_p">
        <maml:name>TopP</maml:name>
        <maml:description>
          <maml:para>An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
So `0.1` means only the tokens comprising the top `10%` probability mass are considered.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="n">
        <maml:name>NumberOfAnswers</maml:name>
        <maml:description>
          <maml:para>How many chat completion choices to generate for each input message.
The default value is `1`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
        <dev:type>
          <maml:name>UInt16</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>1</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Stream</maml:name>
        <maml:description>
          <maml:para>If set, partial message deltas will be sent, like in ChatGPT.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="stop">
        <maml:name>StopSequence</maml:name>
        <maml:description>
          <maml:para>Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
        <dev:type>
          <maml:name>String[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="max_tokens">
        <maml:name>MaxTokens</maml:name>
        <maml:description>
          <maml:para>The maximum number of tokens allowed for the generated answer.
Maximum value depends on model. (`4096` for `gpt-3.5-turbo` or `8192` for `gpt-4`)</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="presence_penalty">
        <maml:name>PresencePenalty</maml:name>
        <maml:description>
          <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="frequency_penalty">
        <maml:name>FrequencyPenalty</maml:name>
        <maml:description>
          <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="logit_bias">
        <maml:name>LogitBias</maml:name>
        <maml:description>
          <maml:para>Modify the likelihood of specified tokens appearing in the completion.
Accepts a maps of tokens to an associated bias value from `-100` to `100`. You can use `ConvertTo-Token` to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between `-1` and `1` should decrease or increase likelihood of selection; values like `-100` or `100` should result in a ban or exclusive selection of the relevant token.
As an example, you can pass like so: `@{23182 = 20; 88847 = -100}`
ID 23182 maps to "apple" and ID 88847 maps to "banana". Thus, this example increases the likelihood of the word "apple" being included in the response from the AI and greatly reduces the likelihood of the word "banana" being included.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">IDictionary</command:parameterValue>
        <dev:type>
          <maml:name>IDictionary</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>User</maml:name>
        <maml:description>
          <maml:para>A unique identifier representing for your end-user. This will help Azure OpenAI monitor and detect abuse.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>TimeoutSec</maml:name>
        <maml:description>
          <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>MaxRetryCount</maml:name>
        <maml:description>
          <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiBase</maml:name>
        <maml:description>
          <maml:para>Specifies yhe name of your Azure OpenAI resource endpoint such like: `https://{your-resource-name}.openai.azure.com/`
If not specified, it will try to use `$global:OPENAI_API_BASE` or `$env:OPENAI_API_BASE`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">System.Uri</command:parameterValue>
        <dev:type>
          <maml:name>System.Uri</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiVersion</maml:name>
        <maml:description>
          <maml:para>The API version to use for this operation.
The default value is `2023-03-15-preview`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>"2023-03-15-preview"</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiKey</maml:name>
        <maml:description>
          <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>AuthType</maml:name>
        <maml:description>
          <maml:para>Specifies the authentication type.
You can choose from `azure` or `azure_ad`.
The default value is `azure`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>"azure"</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="none">
        <maml:name>History</maml:name>
        <maml:description>
          <maml:para>An object for keeping the conversation history.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
        <dev:type>
          <maml:name>Object[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>[pscustomobject]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- Example 1 --------------------------</maml:title>
        <dev:code></dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 1: Ask one question to Azure OpenAI Service, and get an answer.</maml:title>
        <dev:code>PS C:\&gt; $global:OPENAI_API_KEY = '&lt;Put your api key here&gt;'
PS C:\&gt; $global:OPENAI_API_BASE = 'https://&lt;resource-name&gt;.openai.azure.com/'
PS C:\&gt; Request-AzureChatGPT -Message "Who are you?" -Deployment 'YourDeploymentName' | select Answer
 
I am an AI language model created by OpenAI, designed to assist with ...</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/Request-AzureChatCompletion.md</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference?source=recommendations#chat-completions</maml:linkText>
        <maml:uri>https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference?source=recommendations#chat-completions</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Request-AzureEmbeddings</command:name>
      <command:verb>Request</command:verb>
      <command:noun>AzureEmbeddings</command:noun>
      <maml:description>
        <maml:para>Creates an embedding vector representing the input text.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Creates an embedding vector representing the input text by Azure OpenAI Service.
https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#embeddings</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Request-AzureEmbeddings</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="Input">
          <maml:name>Text</maml:name>
          <maml:description>
            <maml:para>(Required) Input text to get embeddings for</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
          <dev:type>
            <maml:name>String[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Deployment</maml:name>
          <maml:description>
            <maml:para>The deployment name you chose when you deployed the model.
Deployments must be created in Azure Portal in advance.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>User</maml:name>
          <maml:description>
            <maml:para>A unique identifier representing for your end-user. This will help Azure OpenAI monitor and detect abuse.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiBase</maml:name>
          <maml:description>
            <maml:para>Specifies yhe name of your Azure OpenAI resource endpoint such like: `https://{your-resource-name}.openai.azure.com/`
If not specified, it will try to use `$global:OPENAI_API_BASE` or `$env:OPENAI_API_BASE`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">System.Uri</command:parameterValue>
          <dev:type>
            <maml:name>System.Uri</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiVersion</maml:name>
          <maml:description>
            <maml:para>The API version to use for this operation.
The default value is `2023-03-15-preview`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>"2023-03-15-preview"</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>AuthType</maml:name>
          <maml:description>
            <maml:para>Specifies the authentication type.
You can choose from `azure` or `azure_ad`.
The default value is `azure`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>"azure"</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="Input">
        <maml:name>Text</maml:name>
        <maml:description>
          <maml:para>(Required) Input text to get embeddings for</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
        <dev:type>
          <maml:name>String[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Deployment</maml:name>
        <maml:description>
          <maml:para>The deployment name you chose when you deployed the model.
Deployments must be created in Azure Portal in advance.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>User</maml:name>
        <maml:description>
          <maml:para>A unique identifier representing for your end-user. This will help Azure OpenAI monitor and detect abuse.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>TimeoutSec</maml:name>
        <maml:description>
          <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>MaxRetryCount</maml:name>
        <maml:description>
          <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiBase</maml:name>
        <maml:description>
          <maml:para>Specifies yhe name of your Azure OpenAI resource endpoint such like: `https://{your-resource-name}.openai.azure.com/`
If not specified, it will try to use `$global:OPENAI_API_BASE` or `$env:OPENAI_API_BASE`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">System.Uri</command:parameterValue>
        <dev:type>
          <maml:name>System.Uri</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiVersion</maml:name>
        <maml:description>
          <maml:para>The API version to use for this operation.
The default value is `2023-03-15-preview`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>"2023-03-15-preview"</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiKey</maml:name>
        <maml:description>
          <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>AuthType</maml:name>
        <maml:description>
          <maml:para>Specifies the authentication type.
You can choose from `azure` or `azure_ad`.
The default value is `azure`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>"azure"</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>[pscustomobject]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>--- Example 1: Get a vector representation of a given input. ---</maml:title>
        <dev:code>PS C:\&gt; $global:OPENAI_API_KEY = '&lt;Put your api key here&gt;'
PS C:\&gt; $global:OPENAI_API_BASE = 'https://&lt;resource-name&gt;.openai.azure.com/'
PS C:\&gt; Request-Embeddings -Text 'Waiter, the food was delicious...' -Deployment 'YourDeploymentName' | select -ExpandProperty data
 
object : embedding
index : 0
embedding : {0.01004226, -0.01884855, 0.01824344, -0.01565562…}
Text : Waiter, the food was delicious...</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/Request-AzureEmbeddings.md</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#embeddings</maml:linkText>
        <maml:uri>https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#embeddings</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Request-AzureTextCompletion</command:name>
      <command:verb>Request</command:verb>
      <command:noun>AzureTextCompletion</command:noun>
      <maml:description>
        <maml:para>Creates a completion for the provided prompt and parameters.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Given a prompt, the AI model will return one or more predicted completions.
https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#completions</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Request-AzureTextCompletion</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="Message">
          <maml:name>Prompt</maml:name>
          <maml:description>
            <maml:para>(Required) The prompt(s) to generate completions for</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
          <dev:type>
            <maml:name>String[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Suffix</maml:name>
          <maml:description>
            <maml:para>The suffix that comes after a completion of inserted text.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Deployment</maml:name>
          <maml:description>
            <maml:para>The deployment name you chose when you deployed the model.
Deployments must be created in Azure Portal in advance.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Temperature</maml:name>
          <maml:description>
            <maml:para>What sampling temperature to use, between `0` and `2`.
Higher values like `0.8` will make the output more random, while lower values like `0.2` will make it more focused and deterministic.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="top_p">
          <maml:name>TopP</maml:name>
          <maml:description>
            <maml:para>An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
So `0.1` means only the tokens comprising the top `10%` probability mass are considered.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="n">
          <maml:name>NumberOfAnswers</maml:name>
          <maml:description>
            <maml:para>How many texts to generate for each prompt. The default value is `1`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
          <dev:type>
            <maml:name>UInt16</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Stream</maml:name>
          <maml:description>
            <maml:para>Whether to stream back partial progress.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="stop">
          <maml:name>StopSequence</maml:name>
          <maml:description>
            <maml:para>Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
          <dev:type>
            <maml:name>String[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="max_tokens">
          <maml:name>MaxTokens</maml:name>
          <maml:description>
            <maml:para>The maximum number of tokens allowed for the generated answer.
The max value depends on models.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>2048</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="presence_penalty">
          <maml:name>PresencePenalty</maml:name>
          <maml:description>
            <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="frequency_penalty">
          <maml:name>FrequencyPenalty</maml:name>
          <maml:description>
            <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="logit_bias">
          <maml:name>LogitBias</maml:name>
          <maml:description>
            <maml:para>Modify the likelihood of specified tokens appearing in the completion.
Accepts a maps of tokens to an associated bias value from `-100` to `100`. You can use `ConvertTo-Token` to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between `-1` and `1` should decrease or increase likelihood of selection; values like `-100` or `100` should result in a ban or exclusive selection of the relevant token.
As an example, you can pass like so: `@{23182 = 20; 88847 = -100}`
ID 23182 maps to "apple" and ID 88847 maps to "banana". Thus, this example increases the likelihood of the word "apple" being included in the response from the AI and greatly reduces the likelihood of the word "banana" being included.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">IDictionary</command:parameterValue>
          <dev:type>
            <maml:name>IDictionary</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>User</maml:name>
          <maml:description>
            <maml:para>A unique identifier representing for your end-user. This will help Azure OpenAI monitor and detect abuse.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Echo</maml:name>
          <maml:description>
            <maml:para>Echo back the prompt in addition to the completion. The default value is `$false`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue>
          <dev:type>
            <maml:name>Boolean</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>$false</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="best_of">
          <maml:name>BestOf</maml:name>
          <maml:description>
            <maml:para>Generates best_of completions server-side and returns the "best" (the one with the highest log probability per token).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
          <dev:type>
            <maml:name>UInt16</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiBase</maml:name>
          <maml:description>
            <maml:para>Specifies yhe name of your Azure OpenAI resource endpoint such like: `https://{your-resource-name}.openai.azure.com/`
If not specified, it will try to use `$global:OPENAI_API_BASE` or `$env:OPENAI_API_BASE`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">System.Uri</command:parameterValue>
          <dev:type>
            <maml:name>System.Uri</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiVersion</maml:name>
          <maml:description>
            <maml:para>The API version to use for this operation.
The default value is `2023-03-15-preview`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>"2023-03-15-preview"</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>AuthType</maml:name>
          <maml:description>
            <maml:para>Specifies the authentication type.
You can choose from `azure` or `azure_ad`.
The default value is `azure`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>"azure"</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="Message">
        <maml:name>Prompt</maml:name>
        <maml:description>
          <maml:para>(Required) The prompt(s) to generate completions for</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
        <dev:type>
          <maml:name>String[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Suffix</maml:name>
        <maml:description>
          <maml:para>The suffix that comes after a completion of inserted text.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Deployment</maml:name>
        <maml:description>
          <maml:para>The deployment name you chose when you deployed the model.
Deployments must be created in Azure Portal in advance.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Temperature</maml:name>
        <maml:description>
          <maml:para>What sampling temperature to use, between `0` and `2`.
Higher values like `0.8` will make the output more random, while lower values like `0.2` will make it more focused and deterministic.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="top_p">
        <maml:name>TopP</maml:name>
        <maml:description>
          <maml:para>An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
So `0.1` means only the tokens comprising the top `10%` probability mass are considered.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="n">
        <maml:name>NumberOfAnswers</maml:name>
        <maml:description>
          <maml:para>How many texts to generate for each prompt. The default value is `1`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
        <dev:type>
          <maml:name>UInt16</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>1</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Stream</maml:name>
        <maml:description>
          <maml:para>Whether to stream back partial progress.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">System.Management.Automation.SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="stop">
        <maml:name>StopSequence</maml:name>
        <maml:description>
          <maml:para>Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
        <dev:type>
          <maml:name>String[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="max_tokens">
        <maml:name>MaxTokens</maml:name>
        <maml:description>
          <maml:para>The maximum number of tokens allowed for the generated answer.
The max value depends on models.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>2048</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="presence_penalty">
        <maml:name>PresencePenalty</maml:name>
        <maml:description>
          <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="frequency_penalty">
        <maml:name>FrequencyPenalty</maml:name>
        <maml:description>
          <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="logit_bias">
        <maml:name>LogitBias</maml:name>
        <maml:description>
          <maml:para>Modify the likelihood of specified tokens appearing in the completion.
Accepts a maps of tokens to an associated bias value from `-100` to `100`. You can use `ConvertTo-Token` to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between `-1` and `1` should decrease or increase likelihood of selection; values like `-100` or `100` should result in a ban or exclusive selection of the relevant token.
As an example, you can pass like so: `@{23182 = 20; 88847 = -100}`
ID 23182 maps to "apple" and ID 88847 maps to "banana". Thus, this example increases the likelihood of the word "apple" being included in the response from the AI and greatly reduces the likelihood of the word "banana" being included.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">IDictionary</command:parameterValue>
        <dev:type>
          <maml:name>IDictionary</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>User</maml:name>
        <maml:description>
          <maml:para>A unique identifier representing for your end-user. This will help Azure OpenAI monitor and detect abuse.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Echo</maml:name>
        <maml:description>
          <maml:para>Echo back the prompt in addition to the completion. The default value is `$false`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue>
        <dev:type>
          <maml:name>Boolean</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>$false</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="best_of">
        <maml:name>BestOf</maml:name>
        <maml:description>
          <maml:para>Generates best_of completions server-side and returns the "best" (the one with the highest log probability per token).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
        <dev:type>
          <maml:name>UInt16</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>TimeoutSec</maml:name>
        <maml:description>
          <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>MaxRetryCount</maml:name>
        <maml:description>
          <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiBase</maml:name>
        <maml:description>
          <maml:para>Specifies yhe name of your Azure OpenAI resource endpoint such like: `https://{your-resource-name}.openai.azure.com/`
If not specified, it will try to use `$global:OPENAI_API_BASE` or `$env:OPENAI_API_BASE`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">System.Uri</command:parameterValue>
        <dev:type>
          <maml:name>System.Uri</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiVersion</maml:name>
        <maml:description>
          <maml:para>The API version to use for this operation.
The default value is `2023-03-15-preview`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>"2023-03-15-preview"</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>ApiKey</maml:name>
        <maml:description>
          <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>AuthType</maml:name>
        <maml:description>
          <maml:para>Specifies the authentication type.
You can choose from `azure` or `azure_ad`.
The default value is `azure`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>"azure"</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>[pscustomobject]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------- Example 1: Estimate the sentences that follow. --------</maml:title>
        <dev:code>PS C:\&gt; $global:OPENAI_API_KEY = '&lt;Put your api key here&gt;'
PS C:\&gt; $global:OPENAI_API_BASE = 'https://&lt;resource-name&gt;.openai.azure.com/'
PS C:\&gt; Request-TextCompletion -Prompt 'This is a hamburger store.' -Deployment 'YourDeploymentName' | select Answer
 
We serves
-classic hamburgers
-tofu burgers</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/Request-AzureTextCompletion.md</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#completions</maml:linkText>
        <maml:uri>https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#completions</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Request-ChatCompletion</command:name>
      <command:verb>Request</command:verb>
      <command:noun>ChatCompletion</command:noun>
      <maml:description>
        <maml:para>Creates a completion for the chat message.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Creates a completion for the chat message.
https://platform.openai.com/docs/guides/chat/chat-completions</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Request-ChatCompletion</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="1" aliases="Text">
          <maml:name>Message</maml:name>
          <maml:description>
            <maml:para>The messages to generate chat completions.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Name</maml:name>
          <maml:description>
            <maml:para>The name of the author of this message.
This is an optional field, and may contain a-z, A-Z, 0-9, hyphens, and underscores, with a maximum length of 64 characters.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Model</maml:name>
          <maml:description>
            <maml:para>The name of model to use. The default value is `gpt-3.5-turbo`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>gpt-3.5-turbo</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="system">
          <maml:name>RolePrompt</maml:name>
          <maml:description>
            <maml:para>An optional text to set the behavior of the assistant.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
          <dev:type>
            <maml:name>String[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Temperature</maml:name>
          <maml:description>
            <maml:para>What sampling temperature to use, between `0` and `2`.
Higher values like `0.8` will make the output more random, while lower values like `0.2` will make it more focused and deterministic.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="top_p">
          <maml:name>TopP</maml:name>
          <maml:description>
            <maml:para>An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
So `0.1` means only the tokens comprising the top `10%` probability mass are considered.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="n">
          <maml:name>NumberOfAnswers</maml:name>
          <maml:description>
            <maml:para>How many chat completion choices to generate for each input message.
The default value is `1`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
          <dev:type>
            <maml:name>UInt16</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Stream</maml:name>
          <maml:description>
            <maml:para>If set, partial message deltas will be sent, like in ChatGPT.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="stop">
          <maml:name>StopSequence</maml:name>
          <maml:description>
            <maml:para>Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
          <dev:type>
            <maml:name>String[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="max_tokens">
          <maml:name>MaxTokens</maml:name>
          <maml:description>
            <maml:para>The maximum number of tokens allowed for the generated answer.
Maximum value depends on model. (`4096` for `gpt-3.5-turbo` or `8192` for `gpt-4`)</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="presence_penalty">
          <maml:name>PresencePenalty</maml:name>
          <maml:description>
            <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="frequency_penalty">
          <maml:name>FrequencyPenalty</maml:name>
          <maml:description>
            <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="logit_bias">
          <maml:name>LogitBias</maml:name>
          <maml:description>
            <maml:para>Modify the likelihood of specified tokens appearing in the completion.
Accepts a maps of tokens to an associated bias value from `-100` to `100`. You can use `ConvertTo-Token` to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between `-1` and `1` should decrease or increase likelihood of selection; values like `-100` or `100` should result in a ban or exclusive selection of the relevant token.
As an example, you can pass like so: `@{23182 = 20; 88847 = -100}`
ID 23182 maps to "apple" and ID 88847 maps to "banana". Thus, this example increases the likelihood of the word "apple" being included in the response from the AI and greatly reduces the likelihood of the word "banana" being included.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">IDictionary</command:parameterValue>
          <dev:type>
            <maml:name>IDictionary</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>User</maml:name>
          <maml:description>
            <maml:para>A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
          <maml:name>Organization</maml:name>
          <maml:description>
            <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="none">
          <maml:name>History</maml:name>
          <maml:description>
            <maml:para>An object for keeping the conversation history.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
          <dev:type>
            <maml:name>Object[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="1" aliases="Text">
        <maml:name>Message</maml:name>
        <maml:description>
          <maml:para>The messages to generate chat completions.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Name</maml:name>
        <maml:description>
          <maml:para>The name of the author of this message.
This is an optional field, and may contain a-z, A-Z, 0-9, hyphens, and underscores, with a maximum length of 64 characters.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Model</maml:name>
        <maml:description>
          <maml:para>The name of model to use. The default value is `gpt-3.5-turbo`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>gpt-3.5-turbo</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="system">
        <maml:name>RolePrompt</maml:name>
        <maml:description>
          <maml:para>An optional text to set the behavior of the assistant.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
        <dev:type>
          <maml:name>String[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Temperature</maml:name>
        <maml:description>
          <maml:para>What sampling temperature to use, between `0` and `2`.
Higher values like `0.8` will make the output more random, while lower values like `0.2` will make it more focused and deterministic.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="top_p">
        <maml:name>TopP</maml:name>
        <maml:description>
          <maml:para>An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
So `0.1` means only the tokens comprising the top `10%` probability mass are considered.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="n">
        <maml:name>NumberOfAnswers</maml:name>
        <maml:description>
          <maml:para>How many chat completion choices to generate for each input message.
The default value is `1`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
        <dev:type>
          <maml:name>UInt16</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>1</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Stream</maml:name>
        <maml:description>
          <maml:para>If set, partial message deltas will be sent, like in ChatGPT.</maml:para>
        </maml:description>
        <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="stop">
        <maml:name>StopSequence</maml:name>
        <maml:description>
          <maml:para>Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
        <dev:type>
          <maml:name>String[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="max_tokens">
        <maml:name>MaxTokens</maml:name>
        <maml:description>
          <maml:para>The maximum number of tokens allowed for the generated answer.
Maximum value depends on model. (`4096` for `gpt-3.5-turbo` or `8192` for `gpt-4`)</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="presence_penalty">
        <maml:name>PresencePenalty</maml:name>
        <maml:description>
          <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="frequency_penalty">
        <maml:name>FrequencyPenalty</maml:name>
        <maml:description>
          <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="logit_bias">
        <maml:name>LogitBias</maml:name>
        <maml:description>
          <maml:para>Modify the likelihood of specified tokens appearing in the completion.
Accepts a maps of tokens to an associated bias value from `-100` to `100`. You can use `ConvertTo-Token` to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between `-1` and `1` should decrease or increase likelihood of selection; values like `-100` or `100` should result in a ban or exclusive selection of the relevant token.
As an example, you can pass like so: `@{23182 = 20; 88847 = -100}`
ID 23182 maps to "apple" and ID 88847 maps to "banana". Thus, this example increases the likelihood of the word "apple" being included in the response from the AI and greatly reduces the likelihood of the word "banana" being included.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">IDictionary</command:parameterValue>
        <dev:type>
          <maml:name>IDictionary</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>User</maml:name>
        <maml:description>
          <maml:para>A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>TimeoutSec</maml:name>
        <maml:description>
          <maml:para>Specifies how long the request can be pending before it times out.
The default value is `0` (infinite).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>MaxRetryCount</maml:name>
        <maml:description>
          <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
        <maml:name>ApiKey</maml:name>
        <maml:description>
          <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
        <maml:name>Organization</maml:name>
        <maml:description>
          <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="none">
        <maml:name>History</maml:name>
        <maml:description>
          <maml:para>An object for keeping the conversation history.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object[]</command:parameterValue>
        <dev:type>
          <maml:name>Object[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>[pscustomobject]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>--- Example 1: Ask one question to ChatGPT, and get answer. ---</maml:title>
        <dev:code>PS C:\&gt; Request-ChatGPT -Message "Who are you?" | select Answer
 
I am an AI language model created by OpenAI, designed to assist with ...</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title> Example 2: Multiple questions with context preserved. (chats) </maml:title>
        <dev:code>PS&gt; $FirstQA = Request-ChatGPT -Message "What is the population of the United States?"
PS&gt; $FirstQA.Answer
 
As of September 2021, the estimated population of the United States is around 331.4 million people.
 
PS\&gt; $SecondQA = $FirstQA | Request-ChatGPT -Message "Translate the previous answer into French."
PS\&gt; $SecondQA.Answer
 
En septembre 2021, la population estimée des États-Unis est d'environ 331,4 millions de personnes.</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>---------------- Example 3: Stream completions. ----------------</maml:title>
        <dev:code>PS C:\&gt; Request-ChatGPT 'Please describe ChatGPT in 100 charactors.' -Stream | Write-Host -NoNewline</dev:code>
        <dev:remarks>
          <maml:para>! stream (/Docs/images/StreamOutput.gif)</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/Request-ChatCompletion.md</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/guides/chat/chat-completions</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/guides/chat/chat-completions</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/api-reference/chat/create</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/api-reference/chat/create</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Request-Embeddings</command:name>
      <command:verb>Request</command:verb>
      <command:noun>Embeddings</command:noun>
      <maml:description>
        <maml:para>Creates an embedding vector representing the input text.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Creates an embedding vector representing the input text.
https://platform.openai.com/docs/guides/embeddings</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Request-Embeddings</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="Input">
          <maml:name>Text</maml:name>
          <maml:description>
            <maml:para>(Required) Input text to get embeddings for</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
          <dev:type>
            <maml:name>String[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Model</maml:name>
          <maml:description>
            <maml:para>The name of model to use. The default value is `text-embedding-ada-002`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>text-embedding-ada-002</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>User</maml:name>
          <maml:description>
            <maml:para>A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
          <maml:name>Organization</maml:name>
          <maml:description>
            <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="Input">
        <maml:name>Text</maml:name>
        <maml:description>
          <maml:para>(Required) Input text to get embeddings for</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
        <dev:type>
          <maml:name>String[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Model</maml:name>
        <maml:description>
          <maml:para>The name of model to use. The default value is `text-embedding-ada-002`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>text-embedding-ada-002</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>User</maml:name>
        <maml:description>
          <maml:para>A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>TimeoutSec</maml:name>
        <maml:description>
          <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>MaxRetryCount</maml:name>
        <maml:description>
          <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
        <maml:name>ApiKey</maml:name>
        <maml:description>
          <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
        <maml:name>Organization</maml:name>
        <maml:description>
          <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>[pscustomobject]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>--- Example 1: Get a vector representation of a given input. ---</maml:title>
        <dev:code>Request-Embeddings -Text 'Waiter, the food was delicious...' | select -ExpandProperty data
 
object : embedding
index : 0
embedding : {0.01004226, -0.01884855, 0.01824344, -0.01565562…}
Text : Waiter, the food was delicious...</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/Request-Embeddings.md</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/guides/embeddings</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/guides/embeddings</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/api-reference/embeddings</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/api-reference/embeddings</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Request-ImageEdit</command:name>
      <command:verb>Request</command:verb>
      <command:noun>ImageEdit</command:noun>
      <maml:description>
        <maml:para>Creates an edited or extended image given an original image and a prompt.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Creates an edited or extended image given an original image and a prompt.
https://platform.openai.com/docs/guides/images/image-generation</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Request-ImageEdit</maml:name>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>Request-ImageEdit</maml:name>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>Request-ImageEdit</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="File">
          <maml:name>Image</maml:name>
          <maml:description>
            <maml:para>(Required) The image to edit.
Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Prompt</maml:name>
          <maml:description>
            <maml:para>(Required) A text description of the desired image(s).
The maximum length is 1000 characters.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Mask</maml:name>
          <maml:description>
            <maml:para>An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited.
Must be a valid PNG file, less than 4MB, and have the same dimensions as image.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="n">
          <maml:name>NumberOfImages</maml:name>
          <maml:description>
            <maml:para>The number of images to generate.
Must be between `1` and `10`. The default value is `1`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
          <dev:type>
            <maml:name>UInt16</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Size</maml:name>
          <maml:description>
            <maml:para>The size of the generated images.
Must be one of `256x256`, `512x512`, or `1024x1024`. The default value is `1024x1024`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1024x1024</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="response_format">
          <maml:name>Format</maml:name>
          <maml:description>
            <maml:para>The format in which the generated images are returned.
Must be one of `url`, `base64` or `byte`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>url</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>User</maml:name>
          <maml:description>
            <maml:para>A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
          <maml:name>Organization</maml:name>
          <maml:description>
            <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>Request-ImageEdit</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="File">
          <maml:name>Image</maml:name>
          <maml:description>
            <maml:para>(Required) The image to edit.
Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Prompt</maml:name>
          <maml:description>
            <maml:para>(Required) A text description of the desired image(s).
The maximum length is 1000 characters.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Mask</maml:name>
          <maml:description>
            <maml:para>An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited.
Must be a valid PNG file, less than 4MB, and have the same dimensions as image.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="n">
          <maml:name>NumberOfImages</maml:name>
          <maml:description>
            <maml:para>The number of images to generate.
Must be between `1` and `10`. The default value is `1`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
          <dev:type>
            <maml:name>UInt16</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Size</maml:name>
          <maml:description>
            <maml:para>The size of the generated images.
Must be one of `256x256`, `512x512`, or `1024x1024`. The default value is `1024x1024`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1024x1024</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>OutFile</maml:name>
          <maml:description>
            <maml:para>Specify the file path where the generated images will be saved.
This cannot be specified with the `Format` parameter. Also, `NumberOfImages` must be `1`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>User</maml:name>
          <maml:description>
            <maml:para>A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
          <maml:name>Organization</maml:name>
          <maml:description>
            <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="File">
        <maml:name>Image</maml:name>
        <maml:description>
          <maml:para>(Required) The image to edit.
Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Prompt</maml:name>
        <maml:description>
          <maml:para>(Required) A text description of the desired image(s).
The maximum length is 1000 characters.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Mask</maml:name>
        <maml:description>
          <maml:para>An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited.
Must be a valid PNG file, less than 4MB, and have the same dimensions as image.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="n">
        <maml:name>NumberOfImages</maml:name>
        <maml:description>
          <maml:para>The number of images to generate.
Must be between `1` and `10`. The default value is `1`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
        <dev:type>
          <maml:name>UInt16</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>1</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Size</maml:name>
        <maml:description>
          <maml:para>The size of the generated images.
Must be one of `256x256`, `512x512`, or `1024x1024`. The default value is `1024x1024`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>1024x1024</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="response_format">
        <maml:name>Format</maml:name>
        <maml:description>
          <maml:para>The format in which the generated images are returned.
Must be one of `url`, `base64` or `byte`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>url</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>OutFile</maml:name>
        <maml:description>
          <maml:para>Specify the file path where the generated images will be saved.
This cannot be specified with the `Format` parameter. Also, `NumberOfImages` must be `1`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>User</maml:name>
        <maml:description>
          <maml:para>A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>TimeoutSec</maml:name>
        <maml:description>
          <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>MaxRetryCount</maml:name>
        <maml:description>
          <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
        <maml:name>ApiKey</maml:name>
        <maml:description>
          <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
        <maml:name>Organization</maml:name>
        <maml:description>
          <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>Format = url : string or array of string</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
      <command:returnValue>
        <dev:type>
          <maml:name>Format = base64 : Generated image data represented in base64 string.</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
      <command:returnValue>
        <dev:type>
          <maml:name>Format = byte : Byte array of generated image.</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
      <command:returnValue>
        <dev:type>
          <maml:name>OutFile : Nothing.</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>--------------- Example 1: Restore masked image. ---------------</maml:title>
        <dev:code>Request-ImageEdit -Image C:\sunflower_mask.png -Prompt "sunflower" -OutFile C:\edit.png -Size 256x256</dev:code>
        <dev:remarks>
          <maml:para>|Source (sunflower_mask.png)|Generated (edit.png)| |----|----| | ! masked (/Docs/images/sunflower_masked.png) | ![restored](/Docs/images/sunflower_restored.png)|</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>--- Example 2: Create variation image from source and mask. ---</maml:title>
        <dev:code>Request-ImageEdit -Image C:\sand_with_feather.png -Mask C:\fether_mask.png -Prompt "A bird on the desert" -OutFile C:\edit2.png</dev:code>
        <dev:remarks>
          <maml:para>|Source (sand_with_feather.png)|Mask (fether_mask.png)|Generated (edit2.png)| |----|----|----| | ! masked (/Docs/images/sand_with_feather.png) | ![mask](/Docs/images/fether_mask.png) | ![restored](/Docs/images/edit2.png)|</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/Request-ImageEdit.md</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/guides/images/image-generation</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/guides/images/image-generation</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/api-reference/images/create-edit</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/api-reference/images/create-edit</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Request-ImageGeneration</command:name>
      <command:verb>Request</command:verb>
      <command:noun>ImageGeneration</command:noun>
      <maml:description>
        <maml:para>Creates an image given a prompt.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Creates an image given a prompt.
https://platform.openai.com/docs/guides/images/image-generation</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Request-ImageGeneration</maml:name>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>Request-ImageGeneration</maml:name>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>Request-ImageGeneration</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none">
          <maml:name>Prompt</maml:name>
          <maml:description>
            <maml:para>(Required) A text description of the desired image(s).
The maximum length is 1000 characters.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="n">
          <maml:name>NumberOfImages</maml:name>
          <maml:description>
            <maml:para>The number of images to generate.
Must be between `1` and `10`. The default value is `1`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
          <dev:type>
            <maml:name>UInt16</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Size</maml:name>
          <maml:description>
            <maml:para>The size of the generated images.
Must be one of `256x256`, `512x512`, or `1024x1024`. The default value is `1024x1024`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1024x1024</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="response_format">
          <maml:name>Format</maml:name>
          <maml:description>
            <maml:para>The format in which the generated images are returned.
Must be one of `url`, `base64` or `byte`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>url</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>User</maml:name>
          <maml:description>
            <maml:para>A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
          <maml:name>Organization</maml:name>
          <maml:description>
            <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>Request-ImageGeneration</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none">
          <maml:name>Prompt</maml:name>
          <maml:description>
            <maml:para>(Required) A text description of the desired image(s).
The maximum length is 1000 characters.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="n">
          <maml:name>NumberOfImages</maml:name>
          <maml:description>
            <maml:para>The number of images to generate.
Must be between `1` and `10`. The default value is `1`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
          <dev:type>
            <maml:name>UInt16</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Size</maml:name>
          <maml:description>
            <maml:para>The size of the generated images.
Must be one of `256x256`, `512x512`, or `1024x1024`. The default value is `1024x1024`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1024x1024</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>OutFile</maml:name>
          <maml:description>
            <maml:para>Specify the file path where the generated images will be saved.
This cannot be specified with the `Format` parameter. Also, `NumberOfImages` must be `1`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>User</maml:name>
          <maml:description>
            <maml:para>A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
          <maml:name>Organization</maml:name>
          <maml:description>
            <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none">
        <maml:name>Prompt</maml:name>
        <maml:description>
          <maml:para>(Required) A text description of the desired image(s).
The maximum length is 1000 characters.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="n">
        <maml:name>NumberOfImages</maml:name>
        <maml:description>
          <maml:para>The number of images to generate.
Must be between `1` and `10`. The default value is `1`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
        <dev:type>
          <maml:name>UInt16</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>1</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Size</maml:name>
        <maml:description>
          <maml:para>The size of the generated images.
Must be one of `256x256`, `512x512`, or `1024x1024`. The default value is `1024x1024`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>1024x1024</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="response_format">
        <maml:name>Format</maml:name>
        <maml:description>
          <maml:para>The format in which the generated images are returned.
Must be one of `url`, `base64` or `byte`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>url</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>OutFile</maml:name>
        <maml:description>
          <maml:para>Specify the file path where the generated images will be saved.
This cannot be specified with the `Format` parameter. Also, `NumberOfImages` must be `1`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>User</maml:name>
        <maml:description>
          <maml:para>A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>TimeoutSec</maml:name>
        <maml:description>
          <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>MaxRetryCount</maml:name>
        <maml:description>
          <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
        <maml:name>ApiKey</maml:name>
        <maml:description>
          <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
        <maml:name>Organization</maml:name>
        <maml:description>
          <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>Format = url : string or array of string</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
      <command:returnValue>
        <dev:type>
          <maml:name>Format = base64 : Generated image data represented in base64 string.</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
      <command:returnValue>
        <dev:type>
          <maml:name>Format = byte : Byte array of generated image.</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
      <command:returnValue>
        <dev:type>
          <maml:name>OutFile : Nothing.</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>------ Example 1: Creates and save an image from prompt. ------</maml:title>
        <dev:code>Request-ImageGeneration -Prompt 'A cute baby lion' -Size 256x256 -OutFile C:\babylion.png</dev:code>
        <dev:remarks>
          <maml:para>! lion (/Docs/images/babylion.png)</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 2: Creates multiple images at once, and retrieve results by URL.</maml:title>
        <dev:code>Request-ImageGeneration -Prompt 'Delicious ramen with gyoza' -Format "url" -NumberOfImages 3
 
https://oaidalleapiprodscus.blob.core.windows.net/private/org-BXLtGIt0xglP9if8FVhkD...
https://oaidalleapiprodscus.blob.core.windows.net/private/org-BXLtGIt0xglP9if8FVhkD...
https://oaidalleapiprodscus.blob.core.windows.net/private/org-BXLtGIt0xglP9if8FVhkD...</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/Request-ImageGeneration.md</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/guides/images/image-generation</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/guides/images/image-generation</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/api-reference/images/create</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/api-reference/images/create</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Request-ImageVariation</command:name>
      <command:verb>Request</command:verb>
      <command:noun>ImageVariation</command:noun>
      <maml:description>
        <maml:para>Creates a variation of a given image.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Creates a variation of a given image.
https://platform.openai.com/docs/guides/images/image-generation</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Request-ImageVariation</maml:name>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>Request-ImageVariation</maml:name>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>Request-ImageVariation</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="File">
          <maml:name>Image</maml:name>
          <maml:description>
            <maml:para>(Required) The image to use as the basis for the variation(s).
Must be a valid PNG file, less than 4MB, and square.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="n">
          <maml:name>NumberOfImages</maml:name>
          <maml:description>
            <maml:para>The number of images to generate.
Must be between `1` and `10`. The default value is `1`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
          <dev:type>
            <maml:name>UInt16</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Size</maml:name>
          <maml:description>
            <maml:para>The size of the generated images.
Must be one of `256x256`, `512x512`, or `1024x1024`. The default value is `1024x1024`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1024x1024</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="response_format">
          <maml:name>Format</maml:name>
          <maml:description>
            <maml:para>The format in which the generated images are returned.
Must be one of `url`, `base64` or `byte`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>url</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>User</maml:name>
          <maml:description>
            <maml:para>A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
          <maml:name>Organization</maml:name>
          <maml:description>
            <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
      <command:syntaxItem>
        <maml:name>Request-ImageVariation</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="File">
          <maml:name>Image</maml:name>
          <maml:description>
            <maml:para>(Required) The image to use as the basis for the variation(s).
Must be a valid PNG file, less than 4MB, and square.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="n">
          <maml:name>NumberOfImages</maml:name>
          <maml:description>
            <maml:para>The number of images to generate.
Must be between `1` and `10`. The default value is `1`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
          <dev:type>
            <maml:name>UInt16</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Size</maml:name>
          <maml:description>
            <maml:para>The size of the generated images.
Must be one of `256x256`, `512x512`, or `1024x1024`. The default value is `1024x1024`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1024x1024</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>OutFile</maml:name>
          <maml:description>
            <maml:para>Specify the file path where the generated images will be saved.
This cannot be specified with the `Format` parameter. Also, `NumberOfImages` must be `1`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>User</maml:name>
          <maml:description>
            <maml:para>A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
          <maml:name>Organization</maml:name>
          <maml:description>
            <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="File">
        <maml:name>Image</maml:name>
        <maml:description>
          <maml:para>(Required) The image to use as the basis for the variation(s).
Must be a valid PNG file, less than 4MB, and square.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="n">
        <maml:name>NumberOfImages</maml:name>
        <maml:description>
          <maml:para>The number of images to generate.
Must be between `1` and `10`. The default value is `1`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
        <dev:type>
          <maml:name>UInt16</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>1</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Size</maml:name>
        <maml:description>
          <maml:para>The size of the generated images.
Must be one of `256x256`, `512x512`, or `1024x1024`. The default value is `1024x1024`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>1024x1024</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="response_format">
        <maml:name>Format</maml:name>
        <maml:description>
          <maml:para>The format in which the generated images are returned.
Must be one of `url`, `base64` or `byte`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>url</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>OutFile</maml:name>
        <maml:description>
          <maml:para>Specify the file path where the generated images will be saved.
This cannot be specified with the `Format` parameter. Also, `NumberOfImages` must be `1`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>User</maml:name>
        <maml:description>
          <maml:para>A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>TimeoutSec</maml:name>
        <maml:description>
          <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>MaxRetryCount</maml:name>
        <maml:description>
          <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
        <maml:name>ApiKey</maml:name>
        <maml:description>
          <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
        <maml:name>Organization</maml:name>
        <maml:description>
          <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>Format = url : string or array of string</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
      <command:returnValue>
        <dev:type>
          <maml:name>Format = base64 : Generated image data represented in base64 string.</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
      <command:returnValue>
        <dev:type>
          <maml:name>Format = byte : Byte array of generated image.</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
      <command:returnValue>
        <dev:type>
          <maml:name>OutFile : Nothing.</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>Example 1: Creates a variation of a given image, then save to file.</maml:title>
        <dev:code>Request-ImageVariation -Image C:\cupcake.png -OutFile C:\cupcake2.png -Size 256x256</dev:code>
        <dev:remarks>
          <maml:para>|Source (cupcake.png)|Generated (cupcake2.png)| |----|----| | ! source (/Docs/images/cupcake.png) | ![output](/Docs/images/cupcake2.png)|</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>Example 2: Creates a variation of a given image, then output as base64 string.</maml:title>
        <dev:code>Request-ImageVariation -Image C:\cupcake.png -Format "base64"
 
iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAIAAADwf7zUAAAAaGV......</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/Request-ImageVariation.md</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/guides/images/image-generation</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/guides/images/image-generation</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/api-reference/images/create-variation</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/api-reference/images/create-variation</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Request-Moderation</command:name>
      <command:verb>Request</command:verb>
      <command:noun>Moderation</command:noun>
      <maml:description>
        <maml:para>Given a input text, outputs if the model classifies it as violating OpenAI's content policy.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Given a input text, outputs if the model classifies it as violating OpenAI's content policy.
The moderation endpoint is free to use when monitoring the inputs and outputs of OpenAI APIs.
https://platform.openai.com/docs/guides/moderation/overview</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Request-Moderation</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="Input">
          <maml:name>Text</maml:name>
          <maml:description>
            <maml:para>(Required) The input text to classify.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
          <dev:type>
            <maml:name>String[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Model</maml:name>
          <maml:description>
            <maml:para>The name of model to use.
Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`.
The default value is `text-moderation-latest`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>text-moderation-latest</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
          <maml:name>Organization</maml:name>
          <maml:description>
            <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="Input">
        <maml:name>Text</maml:name>
        <maml:description>
          <maml:para>(Required) The input text to classify.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
        <dev:type>
          <maml:name>String[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Model</maml:name>
        <maml:description>
          <maml:para>The name of model to use.
Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`.
The default value is `text-moderation-latest`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>text-moderation-latest</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>TimeoutSec</maml:name>
        <maml:description>
          <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>MaxRetryCount</maml:name>
        <maml:description>
          <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
        <maml:name>ApiKey</maml:name>
        <maml:description>
          <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
        <maml:name>Organization</maml:name>
        <maml:description>
          <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>[pscustomobject]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- Example 1 --------------------------</maml:title>
        <dev:code>PS C:\&gt; $Result = Request-Moderation -Text "I want to kill them."
PS C:\&gt; $Result.results.categories
 
sexual : False
hate : False
violence : True
self-harm : False
sexual/minors : False
hate/threatening : False
violence/graphic : False</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/Request-Moderation.md</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/guides/moderation/overview</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/guides/moderation/overview</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/api-reference/moderations</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/api-reference/moderations</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Request-TextCompletion</command:name>
      <command:verb>Request</command:verb>
      <command:noun>TextCompletion</command:noun>
      <maml:description>
        <maml:para>Creates a completion for the provided prompt and parameters.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Given a prompt, the AI model will return one or more predicted completions.
https://platform.openai.com/docs/guides/completion/text-completion</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Request-TextCompletion</maml:name>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="Message">
          <maml:name>Prompt</maml:name>
          <maml:description>
            <maml:para>(Required) The prompt(s) to generate completions for</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
          <dev:type>
            <maml:name>String[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Suffix</maml:name>
          <maml:description>
            <maml:para>The suffix that comes after a completion of inserted text.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Model</maml:name>
          <maml:description>
            <maml:para>The name of model to use. The default value is `text-davinci-003`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>text-davinci-003</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Temperature</maml:name>
          <maml:description>
            <maml:para>What sampling temperature to use, between `0` and `2`.
Higher values like `0.8` will make the output more random, while lower values like `0.2` will make it more focused and deterministic.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="top_p">
          <maml:name>TopP</maml:name>
          <maml:description>
            <maml:para>An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
So `0.1` means only the tokens comprising the top `10%` probability mass are considered.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="n">
          <maml:name>NumberOfAnswers</maml:name>
          <maml:description>
            <maml:para>How many texts to generate for each prompt. The default value is `1`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
          <dev:type>
            <maml:name>UInt16</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Stream</maml:name>
          <maml:description>
            <maml:para>Whether to stream back partial progress.</maml:para>
          </maml:description>
          <dev:type>
            <maml:name>System.Management.Automation.SwitchParameter</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>False</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="stop">
          <maml:name>StopSequence</maml:name>
          <maml:description>
            <maml:para>Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
          <dev:type>
            <maml:name>String[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="max_tokens">
          <maml:name>MaxTokens</maml:name>
          <maml:description>
            <maml:para>The maximum number of tokens allowed for the generated answer.
The max value depends on models.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>2048</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="presence_penalty">
          <maml:name>PresencePenalty</maml:name>
          <maml:description>
            <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="frequency_penalty">
          <maml:name>FrequencyPenalty</maml:name>
          <maml:description>
            <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="logit_bias">
          <maml:name>LogitBias</maml:name>
          <maml:description>
            <maml:para>Modify the likelihood of specified tokens appearing in the completion.
Accepts a maps of tokens to an associated bias value from `-100` to `100`. You can use `ConvertTo-Token` to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between `-1` and `1` should decrease or increase likelihood of selection; values like `-100` or `100` should result in a ban or exclusive selection of the relevant token.
As an example, you can pass like so: `@{23182 = 20; 88847 = -100}`
ID 23182 maps to "apple" and ID 88847 maps to "banana". Thus, this example increases the likelihood of the word "apple" being included in the response from the AI and greatly reduces the likelihood of the word "banana" being included.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">IDictionary</command:parameterValue>
          <dev:type>
            <maml:name>IDictionary</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>User</maml:name>
          <maml:description>
            <maml:para>A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Echo</maml:name>
          <maml:description>
            <maml:para>Echo back the prompt in addition to the completion. The default value is `$false`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue>
          <dev:type>
            <maml:name>Boolean</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>$false</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="best_of">
          <maml:name>BestOf</maml:name>
          <maml:description>
            <maml:para>Generates best_of completions server-side and returns the "best" (the one with the highest log probability per token).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
          <dev:type>
            <maml:name>UInt16</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
          <maml:name>Organization</maml:name>
          <maml:description>
            <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="Message">
        <maml:name>Prompt</maml:name>
        <maml:description>
          <maml:para>(Required) The prompt(s) to generate completions for</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
        <dev:type>
          <maml:name>String[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Suffix</maml:name>
        <maml:description>
          <maml:para>The suffix that comes after a completion of inserted text.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Model</maml:name>
        <maml:description>
          <maml:para>The name of model to use. The default value is `text-davinci-003`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>text-davinci-003</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Temperature</maml:name>
        <maml:description>
          <maml:para>What sampling temperature to use, between `0` and `2`.
Higher values like `0.8` will make the output more random, while lower values like `0.2` will make it more focused and deterministic.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="top_p">
        <maml:name>TopP</maml:name>
        <maml:description>
          <maml:para>An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
So `0.1` means only the tokens comprising the top `10%` probability mass are considered.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="n">
        <maml:name>NumberOfAnswers</maml:name>
        <maml:description>
          <maml:para>How many texts to generate for each prompt. The default value is `1`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
        <dev:type>
          <maml:name>UInt16</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>1</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Stream</maml:name>
        <maml:description>
          <maml:para>Whether to stream back partial progress.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">System.Management.Automation.SwitchParameter</command:parameterValue>
        <dev:type>
          <maml:name>System.Management.Automation.SwitchParameter</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>False</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="stop">
        <maml:name>StopSequence</maml:name>
        <maml:description>
          <maml:para>Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
        <dev:type>
          <maml:name>String[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="max_tokens">
        <maml:name>MaxTokens</maml:name>
        <maml:description>
          <maml:para>The maximum number of tokens allowed for the generated answer.
The max value depends on models.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>2048</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="presence_penalty">
        <maml:name>PresencePenalty</maml:name>
        <maml:description>
          <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="frequency_penalty">
        <maml:name>FrequencyPenalty</maml:name>
        <maml:description>
          <maml:para>Number between `-2.0` and `2.0`.
Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="logit_bias">
        <maml:name>LogitBias</maml:name>
        <maml:description>
          <maml:para>Modify the likelihood of specified tokens appearing in the completion.
Accepts a maps of tokens to an associated bias value from `-100` to `100`. You can use `ConvertTo-Token` to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between `-1` and `1` should decrease or increase likelihood of selection; values like `-100` or `100` should result in a ban or exclusive selection of the relevant token.
As an example, you can pass like so: `@{23182 = 20; 88847 = -100}`
ID 23182 maps to "apple" and ID 88847 maps to "banana". Thus, this example increases the likelihood of the word "apple" being included in the response from the AI and greatly reduces the likelihood of the word "banana" being included.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">IDictionary</command:parameterValue>
        <dev:type>
          <maml:name>IDictionary</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>User</maml:name>
        <maml:description>
          <maml:para>A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Echo</maml:name>
        <maml:description>
          <maml:para>Echo back the prompt in addition to the completion. The default value is `$false`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue>
        <dev:type>
          <maml:name>Boolean</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>$false</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="best_of">
        <maml:name>BestOf</maml:name>
        <maml:description>
          <maml:para>Generates best_of completions server-side and returns the "best" (the one with the highest log probability per token).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
        <dev:type>
          <maml:name>UInt16</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>TimeoutSec</maml:name>
        <maml:description>
          <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>MaxRetryCount</maml:name>
        <maml:description>
          <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
        <maml:name>ApiKey</maml:name>
        <maml:description>
          <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
        <maml:name>Organization</maml:name>
        <maml:description>
          <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>[pscustomobject]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------- Example 1: Estimate the sentences that follow. --------</maml:title>
        <dev:code>Request-TextCompletion -Prompt 'This is a hamburger store.' | select Answer
 
We serves
-classic hamburgers
-tofu burgers</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/Request-TextCompletion.md</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/guides/completion/text-completion</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/guides/completion/text-completion</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/api-reference/completions/create</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/api-reference/completions/create</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Request-TextEdit</command:name>
      <command:verb>Request</command:verb>
      <command:noun>TextEdit</command:noun>
      <maml:description>
        <maml:para>Generate or edit text from the provided prompt and parameters.</maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Generate or edit text from the provided prompt and parameters.
https://platform.openai.com/docs/guides/completion/editing-text</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Request-TextEdit</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="Message">
          <maml:name>Instruction</maml:name>
          <maml:description>
            <maml:para>(Required) The prompt(s) to generate text for.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Input">
          <maml:name>Text</maml:name>
          <maml:description>
            <maml:para>The input text to use as a starting point for the edit.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
          <maml:name>Model</maml:name>
          <maml:description>
            <maml:para>The name of model to use. The default value is `text-davinci-edit-001`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
          <dev:type>
            <maml:name>String</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>text-davinci-edit-001</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>Temperature</maml:name>
          <maml:description>
            <maml:para>What sampling temperature to use, between `0` and `2`.
Higher values like `0.8` will make the output more random, while lower values like `0.2` will make it more focused and deterministic.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="top_p">
          <maml:name>TopP</maml:name>
          <maml:description>
            <maml:para>An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So `0.1` means only the tokens comprising the top `10%` probability mass are considered.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
          <dev:type>
            <maml:name>Double</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="n">
          <maml:name>NumberOfAnswers</maml:name>
          <maml:description>
            <maml:para>How many texts to generate for each prompt. The default value is `1`.</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
          <dev:type>
            <maml:name>UInt16</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>1</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>TimeoutSec</maml:name>
          <maml:description>
            <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
          <maml:name>MaxRetryCount</maml:name>
          <maml:description>
            <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
          <dev:type>
            <maml:name>Int32</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>0</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
          <maml:name>ApiKey</maml:name>
          <maml:description>
            <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
          <dev:type>
            <maml:name>Object</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
          <maml:name>Organization</maml:name>
          <maml:description>
            <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
          </maml:description>
          <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
          <dev:type>
            <maml:name>string</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="Message">
        <maml:name>Instruction</maml:name>
        <maml:description>
          <maml:para>(Required) The prompt(s) to generate text for.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Input">
        <maml:name>Text</maml:name>
        <maml:description>
          <maml:para>The input text to use as a starting point for the edit.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
        <maml:name>Model</maml:name>
        <maml:description>
          <maml:para>The name of model to use. The default value is `text-davinci-edit-001`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
        <dev:type>
          <maml:name>String</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>text-davinci-edit-001</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>Temperature</maml:name>
        <maml:description>
          <maml:para>What sampling temperature to use, between `0` and `2`.
Higher values like `0.8` will make the output more random, while lower values like `0.2` will make it more focused and deterministic.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="top_p">
        <maml:name>TopP</maml:name>
        <maml:description>
          <maml:para>An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So `0.1` means only the tokens comprising the top `10%` probability mass are considered.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
        <dev:type>
          <maml:name>Double</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="n">
        <maml:name>NumberOfAnswers</maml:name>
        <maml:description>
          <maml:para>How many texts to generate for each prompt. The default value is `1`.</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">UInt16</command:parameterValue>
        <dev:type>
          <maml:name>UInt16</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>1</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>TimeoutSec</maml:name>
        <maml:description>
          <maml:para>Specifies how long the request can be pending before it times out. The default value is `0` (infinite).</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none">
        <maml:name>MaxRetryCount</maml:name>
        <maml:description>
          <maml:para>Number between `0` and `100`.
Specifies the maximum number of retries if the request fails.
The default value is `0` (No retry).
Note 1: Retries will only be performed if the request fails with a `429 (Rate limit reached)` or `5xx (Server side errors)` error. Other errors (e.g., authentication failure) will not be performed.
Note 2: Retry intervals increase exponentially with jitters, such as `1s &gt; 2s &gt; 4s &gt; 8s &gt; 16s`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue>
        <dev:type>
          <maml:name>Int32</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>0</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="Token">
        <maml:name>ApiKey</maml:name>
        <maml:description>
          <maml:para>Specifies API key for authentication.
The type of data should `[string]` or `[securestring]`.
If not specified, it will try to use `$global:OPENAI_API_KEY` or `$env:OPENAI_API_KEY`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">Object</command:parameterValue>
        <dev:type>
          <maml:name>Object</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="OrgId">
        <maml:name>Organization</maml:name>
        <maml:description>
          <maml:para>Specifies Organization ID which used for an API request.
If not specified, it will try to use `$global:OPENAI_ORGANIZATION` or `$env:OPENAI_ORGANIZATION`</maml:para>
        </maml:description>
        <command:parameterValue required="true" variableLength="false">string</command:parameterValue>
        <dev:type>
          <maml:name>string</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues>
      <command:returnValue>
        <dev:type>
          <maml:name>[pscustomobject]</maml:name>
        </dev:type>
        <maml:description>
          <maml:para></maml:para>
        </maml:description>
      </command:returnValue>
    </command:returnValues>
    <maml:alertSet>
      <maml:alert>
        <maml:para></maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>------------ Example 1: Fix the spelling mistakes. ------------</maml:title>
        <dev:code>Request-TextEdit -Text 'What day of teh wek is it?' -Instruction "Fix the spelling mistakes" | select Answer
 
What day of the week is it?</dev:code>
        <dev:remarks>
          <maml:para></maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version:</maml:linkText>
        <maml:uri>https://github.com/mkht/PSOpenAI/blob/main/Docs/Request-TextEdit.md</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/guides/completion/editing-text</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/guides/completion/editing-text</maml:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>https://platform.openai.com/docs/api-reference/edits/create</maml:linkText>
        <maml:uri>https://platform.openai.com/docs/api-reference/edits/create</maml:uri>
      </maml:navigationLink>
    </command:relatedLinks>
  </command:command>
</helpItems>