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>Add-OpenAIFile</command:name> <command:verb>Add</command:verb> <command:noun>OpenAIFile</command:noun> <maml:description> <maml:para>Upload a file that can be used across various endpoints.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Upload a file that can be used across various endpoints.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Add-OpenAIFile</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>File</maml:name> <maml:description> <maml:para>The File path to be uploaded.</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>Purpose</maml:name> <maml:description> <maml:para>The intended purpose of the uploaded file. You can specify `fine-tune`, `assistants` or `batch`.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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:syntaxItem> <maml:name>Add-OpenAIFile</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>Content</maml:name> <maml:description> <maml:para>Byte array to be uploaded.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">byte[]</command:parameterValue> <dev:type> <maml:name>byte[]</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>Name</maml:name> <maml:description> <maml:para>The File name to be uploaded.</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>Purpose</maml:name> <maml:description> <maml:para>The intended purpose of the uploaded file. You can specify `fine-tune`, `assistants` or `batch`.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>File</maml:name> <maml:description> <maml:para>The File path to be uploaded.</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="0" aliases="none"> <maml:name>Content</maml:name> <maml:description> <maml:para>Byte array to be uploaded.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">byte[]</command:parameterValue> <dev:type> <maml:name>byte[]</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>Name</maml:name> <maml:description> <maml:para>The File name to be uploaded.</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>Purpose</maml:name> <maml:description> <maml:para>The intended purpose of the uploaded file. You can specify `fine-tune`, `assistants` or `batch`.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> Add-OpenAIFile -File "C:\sample.csv" -Purpose assistants</dev:code> <dev:remarks> <maml:para>Upload `sample.csv` file to OpenAI.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> $ByteArray = [System.Text.Encoding]::UTF8.GetBytes('some text data') PS C:\> Add-OpenAIFile -Content $ByteArray -Name 'filename.txt' -Purpose assistants</dev:code> <dev:remarks> <maml:para>Upload a content of bytes to OpenAI</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/Add-OpenAIFile.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/files/create</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/files/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>Add-RealtimeSessionItem</command:name> <command:verb>Add</command:verb> <command:noun>RealtimeSessionItem</command:noun> <maml:description> <maml:para>Add a new Item to the Conversation's context, including messages, function calls, and function call responses.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Add a new Item to the Conversation's context, including messages, function calls, and function call responses. This event can be used both to populate a "history" of the conversation and to add new items mid-stream</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Add-RealtimeSessionItem</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="0" aliases="Message, Text"> <maml:name>Content</maml:name> <maml:description> <maml:para>The content of the message.</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>ContentTranscript</maml:name> <maml:description> <maml:para>The transcript of the audio, used for `input_audio` content type.</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>ContentType</maml:name> <maml:description> <maml:para>The content type (`input_text`, `input_audio`, `text`). The default value is `input_text`.</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">input_text</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">input_audio</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">text</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">audio</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>input_text</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>EventId</maml:name> <maml:description> <maml:para>Optional client-generated ID used to identify this event.</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>FunctionCallArguments</maml:name> <maml:description> <maml:para>The arguments of the function call (for `function_call` items).</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>FunctionCallId</maml:name> <maml:description> <maml:para>The ID of the function call (for `function_call` and `function_call_output` items).</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>FunctionCallName</maml:name> <maml:description> <maml:para>The name of the function being called (for `function_call` items).</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>FunctionCallOutput</maml:name> <maml:description> <maml:para>The output of the function call (for `function_call_output` items).</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>ItemId</maml:name> <maml:description> <maml:para>The unique ID of the item, this can be generated by the client to help manage server-side context, but is not required because the server will generate one if not provided.</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>ItemType</maml:name> <maml:description> <maml:para>The type of the item (`message`, `function_call`, `function_call_output`). The default is `message`.</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">message</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">function_call</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">function_call_output</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>message</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>PreviousItemId</maml:name> <maml:description> <maml:para>The ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.</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>Role</maml:name> <maml:description> <maml:para>The role of the message sender (`user`, `assistant`, `system`), only applicable for message items.</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">user</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">assistant</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">system</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>user</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Status</maml:name> <maml:description> <maml:para>The status of the item (`completed`, `incomplete`). These have no effect on the conversation.</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">completed</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">in_progress</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">incomplete</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>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>TriggerResponse</maml:name> <maml:description> <maml:para>If specified, instructs the server to create a response after adding this item.</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="false" position="0" aliases="Message, Text"> <maml:name>Content</maml:name> <maml:description> <maml:para>The content of the message.</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>ContentTranscript</maml:name> <maml:description> <maml:para>The transcript of the audio, used for `input_audio` content type.</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>ContentType</maml:name> <maml:description> <maml:para>The content type (`input_text`, `input_audio`, `text`). The default value is `input_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>input_text</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>EventId</maml:name> <maml:description> <maml:para>Optional client-generated ID used to identify this event.</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>FunctionCallArguments</maml:name> <maml:description> <maml:para>The arguments of the function call (for `function_call` items).</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>FunctionCallId</maml:name> <maml:description> <maml:para>The ID of the function call (for `function_call` and `function_call_output` items).</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>FunctionCallName</maml:name> <maml:description> <maml:para>The name of the function being called (for `function_call` items).</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>FunctionCallOutput</maml:name> <maml:description> <maml:para>The output of the function call (for `function_call_output` items).</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>ItemId</maml:name> <maml:description> <maml:para>The unique ID of the item, this can be generated by the client to help manage server-side context, but is not required because the server will generate one if not provided.</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>ItemType</maml:name> <maml:description> <maml:para>The type of the item (`message`, `function_call`, `function_call_output`). The default is `message`.</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>message</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>PreviousItemId</maml:name> <maml:description> <maml:para>The ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.</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>Role</maml:name> <maml:description> <maml:para>The role of the message sender (`user`, `assistant`, `system`), only applicable for message items.</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>user</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Status</maml:name> <maml:description> <maml:para>The status of the item (`completed`, `incomplete`). These have no effect on the conversation.</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>TriggerResponse</maml:name> <maml:description> <maml:para>If specified, instructs the server to create a response after adding this item.</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 /> <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:\> Add-RealtimeSessionItem 'Hello. Why is the sun so bright?'</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Add-RealtimeSessionItem 'This is a great question!' -Role assistant</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/Add-RealtimeSessionItem.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/realtime-client-events/conversation/item/create</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/realtime-client-events/conversation/item/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>Add-ThreadMessage</command:name> <command:verb>Add</command:verb> <command:noun>ThreadMessage</command:noun> <maml:description> <maml:para>Add a message to the Thread.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Add a message to the Thread. The message is usually a question to ask the Assistant.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Add-ThreadMessage</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="0" aliases="Content, Text"> <maml:name>Message</maml:name> <maml:description> <maml:para>The content of the message. </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="True (ByPropertyName, ByValue)" position="named" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>Specifies an ID of Thread.</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>Images</maml:name> <maml:description> <maml:para>An array of images for reference to vision-compatible models. You can specify uploaded file id or URL of image.</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>ImageDetail</maml:name> <maml:description> <maml:para>Specifies the detail level of the image if specified by the user. "low" uses fewer tokens, you can opt in to high resolution using "high".</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>auto</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Role</maml:name> <maml:description> <maml:para>The role of the entity that is creating the message. One of `user` or `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>user</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>FileIdsForCodeInterpreter</maml:name> <maml:description> <maml:para>A list of file IDs made available to the code_interpreter tool. There can be a maximum of 20 files associated with the tool.</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>FileIdsForFileSearch</maml:name> <maml:description> <maml:para>A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.</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>MetaData</maml:name> <maml:description> <maml:para>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.</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>PassThru</maml:name> <maml:description> <maml:para>Returns a Thread object that the message added. By default, this cmdlet doesn't generate any output.</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>WaitForRunComplete</maml:name> <maml:description> <maml:para>This switch parameter, when used, ensures that the cmdlet waits for any active run on the thread to complete before attempting to add a new message. This can help prevent errors that occur when trying to add messages to a thread while a run is still active. This parameter is optional. If not provided, the cmdlet will attempt to add a message to the thread immediately, regardless of whether a run is active or not.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="named" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>Specifies an ID of Thread.</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="0" aliases="Content, Text"> <maml:name>Message</maml:name> <maml:description> <maml:para>The content of the message. </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>Images</maml:name> <maml:description> <maml:para>An array of images for reference to vision-compatible models. You can specify uploaded file id or URL of image.</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>ImageDetail</maml:name> <maml:description> <maml:para>Specifies the detail level of the image if specified by the user. "low" uses fewer tokens, you can opt in to high resolution using "high".</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>auto</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Role</maml:name> <maml:description> <maml:para>The role of the entity that is creating the message. One of `user` or `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>user</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>FileIdsForCodeInterpreter</maml:name> <maml:description> <maml:para>A list of file IDs made available to the code_interpreter tool. There can be a maximum of 20 files associated with the tool.</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>FileIdsForFileSearch</maml:name> <maml:description> <maml:para>A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.</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>MetaData</maml:name> <maml:description> <maml:para>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.</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>PassThru</maml:name> <maml:description> <maml:para>Returns a Thread object that the message added. By default, this cmdlet doesn't generate any output.</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>WaitForRunComplete</maml:name> <maml:description> <maml:para>This switch parameter, when used, ensures that the cmdlet waits for any active run on the thread to complete before attempting to add a new message. This can help prevent errors that occur when trying to add messages to a thread while a run is still active. This parameter is optional. If not provided, the cmdlet will attempt to add a message to the thread immediately, regardless of whether a run is active or not.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 /> <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:\> Add-ThreadMessage -ThreadId "thread_abc1234" -Message "How many people lives in the world?"</dev:code> <dev:remarks> <maml:para>Add a message to the Thread whose ID is `thread_abc1234``. This cmdlet outputs nothing by default.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> $Thread = New-Thread | Add-ThreadMessage -Message "Think of ideas for my friend's wedding gift." -PassThru</dev:code> <dev:remarks> <maml:para>Creates a new Thread and adds a message. When the `-PassThru` switch is specified, this cmdlet returns a Thread object with the message added.</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/Add-ThreadMessage.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/messages/createMessage</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/messages/createMessage</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>Add-VectorStoreFile</command:name> <command:verb>Add</command:verb> <command:noun>VectorStoreFile</command:noun> <maml:description> <maml:para>Attach a file to a vector store.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Attach a file to a vector store.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Add-VectorStoreFile</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store for which to add a File.</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="True (ByPropertyName, ByValue)" position="1" aliases="file_id"> <maml:name>FileId</maml:name> <maml:description> <maml:para>A File ID that the vector store should use.</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="chunking_strategy"> <maml:name>ChunkingStrategy</maml:name> <maml:description> <maml:para>The chunking strategy used to chunk the file(s). If not set, will use the "auto" strategy.</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_chunk_size_tokens"> <maml:name>MaxChunkSizeTokens</maml:name> <maml:description> <maml:para>The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096. Note that the parameter only acceptable when the ChunkingStrategy is "static".</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>800</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="chunk_overlap_tokens"> <maml:name>ChunkOverlapTokens</maml:name> <maml:description> <maml:para>The number of tokens that overlap between chunks. The default value is 400. The value must not exceed half of MaxChunkSizeTokens. Note that the parameter only acceptable when the ChunkingStrategy is "static".</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>400</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>PassThru</maml:name> <maml:description> <maml:para>Returns a Vector Store object that the file added. By default, this cmdlet doesn't return any output.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store for which to add a File.</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="True (ByPropertyName, ByValue)" position="1" aliases="file_id"> <maml:name>FileId</maml:name> <maml:description> <maml:para>A File ID that the vector store should use.</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="chunking_strategy"> <maml:name>ChunkingStrategy</maml:name> <maml:description> <maml:para>The chunking strategy used to chunk the file(s). If not set, will use the "auto" strategy.</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_chunk_size_tokens"> <maml:name>MaxChunkSizeTokens</maml:name> <maml:description> <maml:para>The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096. Note that the parameter only acceptable when the ChunkingStrategy is "static".</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>800</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="chunk_overlap_tokens"> <maml:name>ChunkOverlapTokens</maml:name> <maml:description> <maml:para>The number of tokens that overlap between chunks. The default value is 400. The value must not exceed half of MaxChunkSizeTokens. Note that the parameter only acceptable when the ChunkingStrategy is "static".</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>400</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>PassThru</maml:name> <maml:description> <maml:para>Returns a Vector Store object that the file added. By default, this cmdlet doesn't return any output.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> Add-VectorStoreFile -VectorStoreId 'vs_abc123' -FileId 'file-abc123'</dev:code> <dev:remarks> <maml:para>Attach a file with ID `file-abc123` to the vector store with ID `vs_abc123`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> $Store = Get-VectorStoreFile -VectorStoreId 'vs_abc123' PS C:\> $Store = $Store | Add-VectorStoreFile -FileId 'file-abc123' -PassThru</dev:code> <dev:remarks> <maml:para>Attach a file with ID `file-abc123` to the vector store with ID `vs_abc123`. Then, updates the object of `$Store`</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/Add-VectorStoreFile.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/vector-stores-files/createFile</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/vector-stores-files/createFile</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>Set-OpenAIContext</command:name> <command:verb>Set</command:verb> <command:noun>OpenAIContext</command:noun> <maml:description> <maml:para>Resets the common parameter context set by Set-OpenAIContext.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Resets the common parameter context set by Set-OpenAIContext.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Set-OpenAIContext</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes /> <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:\> Set-OpenAIContext -ApiType 'Azure' -ApiKey 'API_KEY' PS C:\> Clear-OpenAIContext PS C:\> Get-OpenAIContext ApiKey : ApiType : OpenAI ApiBase : ApiVersion : AuthType : openai Organization : TimeoutSec : 0 MaxRetryCount : 0</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/Clear-OpenAIContext.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>Connect-RealtimeSession</command:name> <command:verb>Connect</command:verb> <command:noun>RealtimeSession</command:noun> <maml:description> <maml:para>Create a new OpenAI realtime conversation session.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Create a new realtime conversation session. This technically means connecting to the WebSocket endpoint provided by the OpenAI Realtime API.</maml:para> <maml:para>Once the session is opened, the connection will continue until it is disconnected from the server side or a Disconnect-RealtimeSession is executed. You always need run Disconnect-RealtimeSession when you are finished conversation.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Connect-RealtimeSession</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>It is recommended that you always specify the model you want to use.</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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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>ApiType</maml:name> <maml:description> <maml:para>Specifies API type of use. `OpenAI`(default) or `Azure`</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">OpenAI</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">Azure</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">OpenAIApiType</command:parameterValue> <dev:type> <maml:name>OpenAIApiType</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>OpenAI</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>If you wish to use Entra-ID based authentication, specifies as `azure_ad`.</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">openai</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">azure</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">azure_ad</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>None</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>It is recommended that you always specify the model you want to use.</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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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>ApiType</maml:name> <maml:description> <maml:para>Specifies API type of use. `OpenAI`(default) or `Azure`</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">OpenAIApiType</command:parameterValue> <dev:type> <maml:name>OpenAIApiType</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>OpenAI</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>If you wish to use Entra-ID based authentication, specifies as `azure_ad`.</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 /> <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:\> Connect-RealtimeSession -Model 'gpt-4o-realtime-preview-2024-10-01'</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/Connect-RealtimeSession.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/guides/realtime</maml:linkText> <maml:uri>https://platform.openai.com/docs/guides/realtime</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>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. Currently `cl100k_base` and `o200k_base` are supported. 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">o200k_base</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-embedding-3-small`. 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. Currently `cl100k_base` and `o200k_base` are supported. 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-embedding-3-small`. 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>(102415, 230, 102415, 240, 102415, 239) | ConvertFrom-Token -Encoding 'o200k_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. Currently `cl100k_base` and `o200k_base` are supported. 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">o200k_base</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-embedding-3-small`. 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. Currently `cl100k_base` and `o200k_base` are supported. 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-embedding-3-small`. 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 'o200k_base' # Output: (102415, 230, 102415, 240, 102415, 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>Disconnect-RealtimeSession</command:name> <command:verb>Disconnect</command:verb> <command:noun>RealtimeSession</command:noun> <maml:description> <maml:para>Close realtime session.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Terminates a connected conversation session. If audio input/output is activated, they are also terminated.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Disconnect-RealtimeSession</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes /> <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:\> Disconnect-RealtimeSession</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/Disconnect-RealtimeSession.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>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, RolePrompt"> <maml:name>SystemMessage</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_completion_tokens"> <maml:name>MaxCompletionTokens</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="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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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: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, RolePrompt"> <maml:name>SystemMessage</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_completion_tokens"> <maml:name>MaxCompletionTokens</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="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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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: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:\> 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-Assistant</command:name> <command:verb>Get</command:verb> <command:noun>Assistant</command:noun> <maml:description> <maml:para>Retrieves an assistant.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Get an assistant or List multiple assistants</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-Assistant</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="assistant_id"> <maml:name>AssistantId</maml:name> <maml:description> <maml:para>The ID of the assistant to retrieve.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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:syntaxItem> <maml:name>Get-Assistant</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Limit</maml:name> <maml:description> <maml:para>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</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>20</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>All</maml:name> <maml:description> <maml:para>When this switch is specified, all Assistant objects will be retrieved.</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>Order</maml:name> <maml:description> <maml:para>Sort order by the created timestamp of the objects. `asc` for ascending order and `desc` for descending order. The default is `asc`</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">asc</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">desc</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>asc</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="assistant_id"> <maml:name>AssistantId</maml:name> <maml:description> <maml:para>The ID of the assistant to retrieve.</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>Limit</maml:name> <maml:description> <maml:para>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</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>20</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>All</maml:name> <maml:description> <maml:para>When this switch is specified, all Assistant objects will be retrieved.</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>Order</maml:name> <maml:description> <maml:para>Sort order by the created timestamp of the objects. `asc` for ascending order and `desc` for descending order. The default is `asc`</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>asc</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> Get-Assistant -Limit 5 -Order desc</dev:code> <dev:remarks> <maml:para>Get latest 5 assistants.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Get-Assistant -All</dev:code> <dev:remarks> <maml:para>Get all assistants.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 3 --------------------------</maml:title> <dev:code>PS C:\> Get-Assistant -AssistantId 'asst_abc123'</dev:code> <dev:remarks> <maml:para>Get an assistants with ID of `asst_abc123`.</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-Assistant.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/assistants/getAssistant</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/assistants/getAssistant</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/assistants/listAssistants</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/assistants/listAssistants</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-Batch</command:name> <command:verb>Get</command:verb> <command:noun>Batch</command:noun> <maml:description> <maml:para>Retrieves a batch.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Get an batch or List multiple batches</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-Batch</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="Id, batch_id"> <maml:name>BatchId</maml:name> <maml:description> <maml:para>The ID of the batch to retrieve.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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:syntaxItem> <maml:name>Get-Batch</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Limit</maml:name> <maml:description> <maml:para>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</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>20</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>All</maml:name> <maml:description> <maml:para>When this switch is specified, all batch objects will be retrieved.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="Id, batch_id"> <maml:name>BatchId</maml:name> <maml:description> <maml:para>The ID of the batch to retrieve.</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>Limit</maml:name> <maml:description> <maml:para>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</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>20</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>All</maml:name> <maml:description> <maml:para>When this switch is specified, all batch objects will be retrieved.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> Get-Batch -Limit 5</dev:code> <dev:remarks> <maml:para>Get latest 5 batches.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Get-Batch -All</dev:code> <dev:remarks> <maml:para>Get all batches.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 3 --------------------------</maml:title> <dev:code>PS C:\> Get-Batch -BatchId 'batch_abc123'</dev:code> <dev:remarks> <maml:para>Get a batch with ID of `batch_abc123`.</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-Batch.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/batch/list</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/batch/list</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/batch/retrieve</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/batch/retrieve</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-BatchOutput</command:name> <command:verb>Get</command:verb> <command:noun>BatchOutput</command:noun> <maml:description> <maml:para>Retrieve batch output (result) items.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Retrieve batch output (result) items.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-BatchOutput</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="Id, batch_id"> <maml:name>BatchId</maml:name> <maml:description> <maml:para>Specifies a Batch ID.</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>Wait</maml:name> <maml:description> <maml:para>When the Wait switch is used, it waits until that the Batch is completed and then returns the result.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="Id, batch_id"> <maml:name>BatchId</maml:name> <maml:description> <maml:para>Specifies a Batch ID.</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>Wait</maml:name> <maml:description> <maml:para>When the Wait switch is used, it waits until that the Batch is completed and then returns the result.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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>Batch output items are stored on OpenAI storage as JSONL files. This cmdlet does not delete files on the storage.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> $Result = Get-BatchOutput 'batch_abc123'</dev:code> <dev:remarks> <maml:para>Get an output data in the specified ID of batch</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-BatchOutput.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/batch/requestOutput</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/batch/requestOutput</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:\> $v1 = (-0.01302161, -0.01999075, 0.007301898) PS C:\> $v2 = (0.01506045, -0.04311577, 0.01272033) PS C:\> 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>Set-OpenAIContext</command:name> <command:verb>Set</command:verb> <command:noun>OpenAIContext</command:noun> <maml:description> <maml:para>Gets common parameters that are implicitly used when executing functions.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Gets the common parameter context that is set by Set-OpenAIContext. Note: Objects obtained with Get-OpenAIContext are read-only, and changes to their property values are not reflected in the context. To set the context, use Set-OpenAIContext.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Set-OpenAIContext</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes /> <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:\> Set-OpenAIContext -ApiType 'Azure' -ApiKey 'AZURE_API_KEY' -ApiBase 'https://my-endpoint.openai.azure.com/' PS C:\> Get-OpenAIContext ApiKey : System.Security.SecureString ApiType : Azure ApiBase : https://my-endpoint.openai.azure.com/ ApiVersion : AuthType : azure Organization : TimeoutSec : 0 MaxRetryCount : 0</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-OpenAIContext.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-OpenAIFile</command:name> <command:verb>Get</command:verb> <command:noun>OpenAIFile</command:noun> <maml:description> <maml:para>Retrieves information about files stored in OpenAI, allowing for listing and retrieving specific files.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Retrieves information about files stored in OpenAI, allowing for listing and retrieving specific files.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-OpenAIFile</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="Id, file_id"> <maml:name>FileId</maml:name> <maml:description> <maml:para>Specifies the ID of the file to be retrieved.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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:syntaxItem> <maml:name>Get-OpenAIFile</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Purpose</maml:name> <maml:description> <maml:para>Only return files with the given purpose.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="Id, file_id"> <maml:name>FileId</maml:name> <maml:description> <maml:para>Specifies the ID of the file to be retrieved.</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>Purpose</maml:name> <maml:description> <maml:para>Only return files with the given purpose.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> Get-OpenAIFile -FileId "file-abc123"</dev:code> <dev:remarks> <maml:para>This command retrieves a file with the specified ID from OpenAI.</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-OpenAIFile.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/files/list</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/files/list</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/files/retrieve</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/files/retrieve</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-OpenAIFileContent</command:name> <command:verb>Get</command:verb> <command:noun>OpenAIFileContent</command:noun> <maml:description> <maml:para>Retrieves the contents of a file.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Retrieves the contents of a file. You can choose to output as a byte array or save to a file. Note: The OpenAI API specification limits the types of files whose contents can be retrieved.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-OpenAIFileContent</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="Id, file_id"> <maml:name>FileId</maml:name> <maml:description> <maml:para>The ID of the file to use for this request.</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>OutFile</maml:name> <maml:description> <maml:para>The path of the file to save.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="Id, file_id"> <maml:name>FileId</maml:name> <maml:description> <maml:para>The ID of the file to use for this request.</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>OutFile</maml:name> <maml:description> <maml:para>The path of the file to save.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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>[System.Byte[]]</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:\> Get-OpenAIFileContent -FileId 'file-abc123' -OutFile C:\file.csv</dev:code> <dev:remarks> <maml:para>Retrieve the contents of the file whose ID is file-abc123 and save it to C:\file.csv</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-OpenAIFileContent.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/files/retrieve-contents</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/files/retrieve-contents</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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:\> Get-OpenAIModels | select -ExpandProperty ID babbage davinci gpt-3.5-turbo-0613 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:\> 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>Get-Thread</command:name> <command:verb>Get</command:verb> <command:noun>Thread</command:noun> <maml:description> <maml:para>Retrieves a thread.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Retrieves a thread.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-Thread</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>Specifies the ID of thread.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>Specifies the ID of thread.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> $Thread = Get-Thread -ThreadId 'thread_abc123'</dev:code> <dev:remarks> <maml:para>Retrieves a Thread object that has the ID with `thread_abc123`</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-Thread.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/threads/getThread</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/threads/getThread</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-ThreadMessage</command:name> <command:verb>Get</command:verb> <command:noun>ThreadMessage</command:noun> <maml:description> <maml:para>Lists or Retrieves a Message of the Thread.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Lists or Retrieves a Message of the Thread.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-ThreadMessage</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the Thread for retrieve.</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="True (ByPropertyName, ByValue)" position="named" aliases="message_id"> <maml:name>MessageId</maml:name> <maml:description> <maml:para>The ID of the Message to retrieve.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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:syntaxItem> <maml:name>Get-ThreadMessage</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the Thread for retrieve.</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>Limit</maml:name> <maml:description> <maml:para>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</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>20</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="run_id"> <maml:name>RunId</maml:name> <maml:description> <maml:para>Filter messages by the run ID that generated them.</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>All</maml:name> <maml:description> <maml:para>When this switch is specified, all Message objects will be retrieved.</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>Order</maml:name> <maml:description> <maml:para>Sort order by the created timestamp of the objects. `asc` for ascending order and `desc` for descending order. The default is `asc`</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">asc</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">desc</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>asc</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the Thread for retrieve.</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="True (ByPropertyName, ByValue)" position="named" aliases="message_id"> <maml:name>MessageId</maml:name> <maml:description> <maml:para>The ID of the Message to retrieve.</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>Limit</maml:name> <maml:description> <maml:para>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</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>20</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="run_id"> <maml:name>RunId</maml:name> <maml:description> <maml:para>Filter messages by the run ID that generated them.</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>All</maml:name> <maml:description> <maml:para>When this switch is specified, all Message objects will be retrieved.</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>Order</maml:name> <maml:description> <maml:para>Sort order by the created timestamp of the objects. `asc` for ascending order and `desc` for descending order. The default is `asc`</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>asc</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> Get-ThreadMessage -ThreadId 'thread_abc123' -All</dev:code> <dev:remarks> <maml:para>List all message objects associated with the Thread whose ID is `thread_abc123`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Get-ThreadMessage -ThreadId 'thread_abc123' -MessageId 'msg_abc123'</dev:code> <dev:remarks> <maml:para>Retrieve a message with ID `msg_abc123` associated with the Thread whose ID is `thread_abc123`.</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-ThreadMessage.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/messages/getMessage</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/messages/getMessage</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/messages/listMessages</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/messages/listMessages</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-ThreadRun</command:name> <command:verb>Get</command:verb> <command:noun>ThreadRun</command:noun> <maml:description> <maml:para>Retrieves a run.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Retrieves a run.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-ThreadRun</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the thread that was run.</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="True (ByPropertyName)" position="1" aliases="run_id"> <maml:name>RunId</maml:name> <maml:description> <maml:para>The ID of the run to retrieve.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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:syntaxItem> <maml:name>Get-ThreadRun</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the thread that was run.</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>Limit</maml:name> <maml:description> <maml:para>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</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>20</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>All</maml:name> <maml:description> <maml:para>When this switch is specified, all run objects will be retrieved.</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>Order</maml:name> <maml:description> <maml:para>Sort order by the created timestamp of the objects. `asc` for ascending order and `desc` for descending order. The default is `asc`</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">asc</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">desc</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>asc</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the thread that was run.</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="True (ByPropertyName)" position="1" aliases="run_id"> <maml:name>RunId</maml:name> <maml:description> <maml:para>The ID of the run to retrieve.</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>Limit</maml:name> <maml:description> <maml:para>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</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>20</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>All</maml:name> <maml:description> <maml:para>When this switch is specified, all run objects will be retrieved.</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>Order</maml:name> <maml:description> <maml:para>Sort order by the created timestamp of the objects. `asc` for ascending order and `desc` for descending order. The default is `asc`</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>asc</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> Get-ThreadRun -RunId 'run_abc123' -ThreadId 'thread_abc123'</dev:code> <dev:remarks> <maml:para>Retrieve a run with ID `run_abc123` associated with the Thread whose ID is `thread_abc123`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Get-ThreadRun -ThreadId 'thread_abc123' -All</dev:code> <dev:remarks> <maml:para>List all run objects associated with the Thread whose ID is `thread_abc123`.</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-ThreadRun.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/runs/getRun</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/runs/getRun</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/runs/listRuns</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/runs/listRuns</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-ThreadRunStep</command:name> <command:verb>Get</command:verb> <command:noun>ThreadRunStep</command:noun> <maml:description> <maml:para>Retrieves a run step.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Retrieves a run step.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-ThreadRunStep</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="run_id"> <maml:name>RunId</maml:name> <maml:description> <maml:para>The ID of the run to retrieve.</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="True (ByPropertyName)" position="1" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the thread to retrieve.</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="True (ByPropertyName)" position="2" aliases="step_id"> <maml:name>StepId</maml:name> <maml:description> <maml:para>The ID of the step to retrieve.</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>Include</maml:name> <maml:description> <maml:para>A list of additional fields to include in the response.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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:syntaxItem> <maml:name>Get-ThreadRunStep</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="run_id"> <maml:name>RunId</maml:name> <maml:description> <maml:para>The ID of the run to retrieve.</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>Limit</maml:name> <maml:description> <maml:para>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</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>20</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Order</maml:name> <maml:description> <maml:para>Sort order by the created timestamp of the objects. `asc` for ascending order and `desc` for descending order. The default is `asc`</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">asc</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">desc</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>asc</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Include</maml:name> <maml:description> <maml:para>A list of additional fields to include in the response.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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:syntaxItem> <maml:name>Get-ThreadRunStep</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="run_id"> <maml:name>RunId</maml:name> <maml:description> <maml:para>The ID of the run to retrieve.</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>All</maml:name> <maml:description> <maml:para>When this switch is specified, all Step objects will be retrieved.</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>Order</maml:name> <maml:description> <maml:para>Sort order by the created timestamp of the objects. `asc` for ascending order and `desc` for descending order. The default is `asc`</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">asc</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">desc</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>asc</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Include</maml:name> <maml:description> <maml:para>A list of additional fields to include in the response.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="run_id"> <maml:name>RunId</maml:name> <maml:description> <maml:para>The ID of the run to retrieve.</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="True (ByPropertyName)" position="1" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the thread to retrieve.</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="True (ByPropertyName)" position="2" aliases="step_id"> <maml:name>StepId</maml:name> <maml:description> <maml:para>The ID of the step to retrieve.</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>Limit</maml:name> <maml:description> <maml:para>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</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>20</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>All</maml:name> <maml:description> <maml:para>When this switch is specified, all Step objects will be retrieved.</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>Order</maml:name> <maml:description> <maml:para>Sort order by the created timestamp of the objects. `asc` for ascending order and `desc` for descending order. The default is `asc`</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>asc</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Include</maml:name> <maml:description> <maml:para>A list of additional fields to include in the response.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> Get-Thread 'thread_abc123' | Get-ThreadRun | Get-ThreadRunStep -All</dev:code> <dev:remarks> <maml:para>List all run step objects associated with the Thread whose ID is `thread_abc123`.</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-ThreadRunStep.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/runs/getRunStep</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/runs/getRunStep</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/runs/listRunSteps</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/runs/listRunSteps</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-VectorStore</command:name> <command:verb>Get</command:verb> <command:noun>VectorStore</command:noun> <maml:description> <maml:para>Retrieves a vector store.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Get a vector srore or List multiple vector srore</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-VectorStore</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store to retrieve.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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:syntaxItem> <maml:name>Get-VectorStore</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Limit</maml:name> <maml:description> <maml:para>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</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>20</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Order</maml:name> <maml:description> <maml:para>Sort order by the created timestamp of the objects. `asc` for ascending order and `desc` for descending order. The default is `asc`</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">asc</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">desc</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>asc</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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:syntaxItem> <maml:name>Get-VectorStore</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>All</maml:name> <maml:description> <maml:para>When this switch is specified, all vector stores will be retrieved.</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>Order</maml:name> <maml:description> <maml:para>Sort order by the created timestamp of the objects. `asc` for ascending order and `desc` for descending order. The default is `asc`</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">asc</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">desc</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>asc</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store to retrieve.</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>Limit</maml:name> <maml:description> <maml:para>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</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>20</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>All</maml:name> <maml:description> <maml:para>When this switch is specified, all vector stores will be retrieved.</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>Order</maml:name> <maml:description> <maml:para>Sort order by the created timestamp of the objects. `asc` for ascending order and `desc` for descending order. The default is `asc`</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>asc</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> Get-VectorStore "vs_abc123"</dev:code> <dev:remarks> <maml:para>Get a vector store with ID of `vs_abc123`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Get-VectorStore -Limit 5 -Order desc</dev:code> <dev:remarks> <maml:para>Get latest 5 vector stores.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 3 --------------------------</maml:title> <dev:code>PS C:\> Get-VectorStore -All</dev:code> <dev:remarks> <maml:para>Get all vector stores.</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-VectorStore.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/vector-stores/retrieve</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/vector-stores/retrieve</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/vector-stores/list</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/vector-stores/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-VectorStoreFile</command:name> <command:verb>Get</command:verb> <command:noun>VectorStoreFile</command:noun> <maml:description> <maml:para>Retrieves vector store files.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Retrieves vector store files.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-VectorStoreFile</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store that the file belongs to.</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="True (ByPropertyName)" position="1" aliases="file_id"> <maml:name>FileId</maml:name> <maml:description> <maml:para>The ID of the file being retrieved.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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:syntaxItem> <maml:name>Get-VectorStoreFile</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Filter</maml:name> <maml:description> <maml:para>Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.</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>Limit</maml:name> <maml:description> <maml:para>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</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>20</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Order</maml:name> <maml:description> <maml:para>Sort order by the created timestamp of the objects. `asc` for ascending order and `desc` for descending order. The default is `asc`</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">asc</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">desc</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>asc</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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:syntaxItem> <maml:name>Get-VectorStoreFile</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Filter</maml:name> <maml:description> <maml:para>Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.</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>All</maml:name> <maml:description> <maml:para>When this switch is specified, all vector stores will be retrieved.</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>Order</maml:name> <maml:description> <maml:para>Sort order by the created timestamp of the objects. `asc` for ascending order and `desc` for descending order. The default is `asc`</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">asc</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">desc</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>asc</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store that the file belongs to.</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="True (ByPropertyName)" position="1" aliases="file_id"> <maml:name>FileId</maml:name> <maml:description> <maml:para>The ID of the file being retrieved.</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>Filter</maml:name> <maml:description> <maml:para>Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.</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>Limit</maml:name> <maml:description> <maml:para>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</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>20</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>All</maml:name> <maml:description> <maml:para>When this switch is specified, all vector stores will be retrieved.</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>Order</maml:name> <maml:description> <maml:para>Sort order by the created timestamp of the objects. `asc` for ascending order and `desc` for descending order. The default is `asc`</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>asc</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> Get-VectorStoreFile -VectorStoreId 'vs_abc123' -FileId 'file-abc123'</dev:code> <dev:remarks> <maml:para>Get a file with ID `file-abc123` in the vector store with ID of `vs_abc123`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Get-VectorStoreFile -VectorStoreId 'vs_abc123' -All</dev:code> <dev:remarks> <maml:para>Get all files in the vector store with ID of `vs_abc123`.</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-VectorStoreFile.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/vector-stores-files/getFile</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/vector-stores-files/getFile</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/vector-stores-files/listFiles</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/vector-stores-files/listFiles</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-VectorStoreFileBatch</command:name> <command:verb>Get</command:verb> <command:noun>VectorStoreFileBatch</command:noun> <maml:description> <maml:para>Retrieves a vector store file batch.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Retrieves a vector store file batch.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-VectorStoreFileBatch</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store that the batch belongs to.</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="True (ByPropertyName)" position="1" aliases="batch_id"> <maml:name>BatchId</maml:name> <maml:description> <maml:para>The ID of the file batch being retrieved.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store that the batch belongs to.</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="True (ByPropertyName)" position="1" aliases="batch_id"> <maml:name>BatchId</maml:name> <maml:description> <maml:para>The ID of the file batch being retrieved.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> Get-VectorStoreFileBatch -VectorStoreId "vs_abc123" -BatchId 'vsfb_abc123'</dev:code> <dev:remarks> <maml:para>Get a vector store file batch with ID `vsfb_abc123`.</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-VectorStoreFileBatch.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/vector-stores-file-batches/getBatch</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/vector-stores-file-batches/getBatch</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-VectorStoreFileInBatch</command:name> <command:verb>Get</command:verb> <command:noun>VectorStoreFileInBatch</command:noun> <maml:description> <maml:para>Returns a list of vector store files in a batch.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Returns a list of vector store files in a batch.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-VectorStoreFileInBatch</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store that the batch belongs to.</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="True (ByPropertyName)" position="1" aliases="batch_id"> <maml:name>BatchId</maml:name> <maml:description> <maml:para>The ID of the file batch being retrieved.</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>Filter</maml:name> <maml:description> <maml:para>Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.</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>Limit</maml:name> <maml:description> <maml:para>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</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>20</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>All</maml:name> <maml:description> <maml:para>When this switch is specified, all files in a batch will be retrieved.</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>Order</maml:name> <maml:description> <maml:para>Sort order by the created timestamp of the objects. `asc` for ascending order and `desc` for descending order. The default is `asc`</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">asc</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">desc</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>asc</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store that the batch belongs to.</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="True (ByPropertyName)" position="1" aliases="batch_id"> <maml:name>BatchId</maml:name> <maml:description> <maml:para>The ID of the file batch being retrieved.</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>Filter</maml:name> <maml:description> <maml:para>Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.</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>Limit</maml:name> <maml:description> <maml:para>A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.</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>20</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>All</maml:name> <maml:description> <maml:para>When this switch is specified, all files in a batch will be retrieved.</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>Order</maml:name> <maml:description> <maml:para>Sort order by the created timestamp of the objects. `asc` for ascending order and `desc` for descending order. The default is `asc`</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>asc</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> Get-VectorStoreFileInBatch -VectorStoreId 'vs_abc123' -BatchId 'vsfb_abc123' -All</dev:code> <dev:remarks> <maml:para>Get all files in the vector store batch with ID of `vsfb_abc123`.</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-VectorStoreFileInBatch.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/vector-stores-file-batches/listBatchFiles</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/vector-stores-file-batches/listBatchFiles</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-Assistant</command:name> <command:verb>New</command:verb> <command:noun>Assistant</command:noun> <maml:description> <maml:para>Create an assistant with a model and instructions.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Create an assistant with a model and instructions. An Assistant represents an entity that can be configured to respond to users’ Messages using several parameters.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-Assistant</maml:name> <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 assistant. The maximum length is 256 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>ID of the 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="none"> <maml:name>Description</maml:name> <maml:description> <maml:para>The description of the assistant. The maximum length is 512 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>Instructions</maml:name> <maml:description> <maml:para>The system instructions that the assistant uses. The maximum length is 256,000 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>UseCodeInterpreter</maml:name> <maml:description> <maml:para>Specifies Whether the code interpreter tool enable or not. The default is `$false`.</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>UseFileSearch</maml:name> <maml:description> <maml:para>Specifies Whether the file_search tool enable or not. The default is `$false`.</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>Functions</maml:name> <maml:description> <maml:para>A list of functions the model may call. Use this to provide a list of functions the model may generate JSON inputs for. </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>FileIdsForCodeInterpreter</maml:name> <maml:description> <maml:para>A list of file IDs made available to the code_interpreter tool. There can be a maximum of 20 files associated with the tool.</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>VectorStoresForFileSearch</maml:name> <maml:description> <maml:para>The vector store attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.</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>FileIdsForFileSearch</maml:name> <maml:description> <maml:para>A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.</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>MaxNumberOfFileSearchResults</maml:name> <maml:description> <maml:para>The maximum number of results the file search tool should output. This number should be between 1 and 50 inclusive.</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>RankerForFileSearch</maml:name> <maml:description> <maml:para>The ranker to use for the file search. If not specified will use the auto ranker.</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>ScoreThresholdForFileSearch</maml:name> <maml:description> <maml:para>The score threshold for the file search. All values must be a floating point number between 0 and 1.</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>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="none"> <maml:name>MetaData</maml:name> <maml:description> <maml:para>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.</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="response_format"> <maml:name>Format</maml:name> <maml:description> <maml:para>Specifies the format that the model must output. - `auto` is default. - `json_object` enables JSON mode, which ensures the message the model generates is valid JSON. - `json_schema` enables Structured Outputs which ensures the model will match your supplied JSON schema.</maml:para> <maml:para>- `raw_response` returns raw response content from API.</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>JsonSchema</maml:name> <maml:description> <maml:para>Specifies an object or data structure to represent the JSON Schema that the model should be constrained to follow. Required if `json_schema` is specified for `-Format`. Otherwise, it is ignored.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="false" position="named" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the assistant. The maximum length is 256 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>ID of the 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="none"> <maml:name>Description</maml:name> <maml:description> <maml:para>The description of the assistant. The maximum length is 512 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>Instructions</maml:name> <maml:description> <maml:para>The system instructions that the assistant uses. The maximum length is 256,000 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>UseCodeInterpreter</maml:name> <maml:description> <maml:para>Specifies Whether the code interpreter tool enable or not. The default is `$false`.</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>UseFileSearch</maml:name> <maml:description> <maml:para>Specifies Whether the file_search tool enable or not. The default is `$false`.</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>Functions</maml:name> <maml:description> <maml:para>A list of functions the model may call. Use this to provide a list of functions the model may generate JSON inputs for. </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>FileIdsForCodeInterpreter</maml:name> <maml:description> <maml:para>A list of file IDs made available to the code_interpreter tool. There can be a maximum of 20 files associated with the tool.</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>VectorStoresForFileSearch</maml:name> <maml:description> <maml:para>The vector store attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.</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>FileIdsForFileSearch</maml:name> <maml:description> <maml:para>A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.</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>MaxNumberOfFileSearchResults</maml:name> <maml:description> <maml:para>The maximum number of results the file search tool should output. This number should be between 1 and 50 inclusive.</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>RankerForFileSearch</maml:name> <maml:description> <maml:para>The ranker to use for the file search. If not specified will use the auto ranker.</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>ScoreThresholdForFileSearch</maml:name> <maml:description> <maml:para>The score threshold for the file search. All values must be a floating point number between 0 and 1.</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>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="none"> <maml:name>MetaData</maml:name> <maml:description> <maml:para>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.</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="response_format"> <maml:name>Format</maml:name> <maml:description> <maml:para>Specifies the format that the model must output. - `auto` is default. - `json_object` enables JSON mode, which ensures the message the model generates is valid JSON. - `json_schema` enables Structured Outputs which ensures the model will match your supplied JSON schema.</maml:para> <maml:para>- `raw_response` returns raw response content from API.</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>JsonSchema</maml:name> <maml:description> <maml:para>Specifies an object or data structure to represent the JSON Schema that the model should be constrained to follow. Required if `json_schema` is specified for `-Format`. Otherwise, it is ignored.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> $Assistant = New-Assistant -Model gpt-4 -Instructions "You are a math teacher." -UseCodeInterpreter $true</dev:code> <dev:remarks> <maml:para>Create an assitant with a model and instructions and enable to use code interpreter.</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-Assistant.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/assistants/createAssistant</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/assistants/createAssistant</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/assistants/overview/</maml:linkText> <maml:uri>https://platform.openai.com/docs/assistants/overview/</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-ChatCompletionFunction</command:name> <command:verb>New</command:verb> <command:noun>ChatCompletionFunction</command:noun> <maml:description> <maml:para>Generate function spcifications for ChatGPT Function calling from PowerShell commands</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Generate function spcifications for ChatGPT Function calling from PowerShell commands The generated function spcification is a hash table that can be converted to a JSON string following JSON Schema. https://platform.openai.com/docs/guides/gpt/function-calling</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-ChatCompletionFunction</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>Command</maml:name> <maml:description> <maml:para>Specify the name of the PowerShell command.</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>Description</maml:name> <maml:description> <maml:para>Specifies the descriptive text of the PowerShell command. If not specified, the command help description will be used.</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>ExcludeParameters</maml:name> <maml:description> <maml:para>Names of parameters that should not be included in the function definition.</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>IncludeParameters</maml:name> <maml:description> <maml:para>Name of the parameter to be included in the function definition. If this parameter is specified, any unspecified parameters will not be included in the function definition.</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>ParameterSetName</maml:name> <maml:description> <maml:para>If a PowerShell command has multiple parameter sets, the default parameter set is selected by default. If you want to use a non-default parameter set, specify the set name in this parameter.</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="0" aliases="none"> <maml:name>Command</maml:name> <maml:description> <maml:para>Specify the name of the PowerShell command.</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>Description</maml:name> <maml:description> <maml:para>Specifies the descriptive text of the PowerShell command. If not specified, the command help description will be used.</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>ExcludeParameters</maml:name> <maml:description> <maml:para>Names of parameters that should not be included in the function definition.</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>IncludeParameters</maml:name> <maml:description> <maml:para>Name of the parameter to be included in the function definition. If this parameter is specified, any unspecified parameters will not be included in the function definition.</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>ParameterSetName</maml:name> <maml:description> <maml:para>If a PowerShell command has multiple parameter sets, the default parameter set is selected by default. If you want to use a non-default parameter set, specify the set name in this parameter.</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>None</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.Collections.Specialized.OrderedDictionary</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:\> New-ChatCompletionFunction -Command "New-Item"</dev:code> <dev:remarks> <maml:para>Generates a function definition for the `New-Item` command.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> New-ChatCompletionFunction -Command "Test-Connection" -IncludeParameters ('TargetName', 'Count', 'Delay')</dev:code> <dev:remarks> <maml:para>Generate a function spcification for the `Test-Connection` command. Only three parameters are included in the function definition: `TargetName`, `Count`, and `Delay`.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 3 --------------------------</maml:title> <dev:code>PS C:\> New-ChatCompletionFunction -Command "Test-NetConnection" -ParameterSetName "RemotePort" -Description "This command tests TCP connectivity of the specified hosts or address and displays the results."</dev:code> <dev:remarks> <maml:para>Generate a function definition for the `Test-NetConnection` command. Explicitly specifies the parameter set name and command description.</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-ChatCompletionFunction.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/guides/gpt/function-calling</maml:linkText> <maml:uri>https://platform.openai.com/docs/guides/gpt/function-calling</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-Thread</command:name> <command:verb>New</command:verb> <command:noun>Thread</command:noun> <maml:description> <maml:para>Create a thread.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Create a thread.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-Thread</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>FileIdsForCodeInterpreter</maml:name> <maml:description> <maml:para>A list of file IDs made available to the code_interpreter tool. There can be a maximum of 20 files associated with the tool.</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>VectorStoresForFileSearch</maml:name> <maml:description> <maml:para>The vector store attached to this thread. There can be a maximum of 1 vector store attached to the thread.</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>FileIdsForFileSearch</maml:name> <maml:description> <maml:para>A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.</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>MetaData</maml:name> <maml:description> <maml:para>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="false" position="named" aliases="none"> <maml:name>FileIdsForCodeInterpreter</maml:name> <maml:description> <maml:para>A list of file IDs made available to the code_interpreter tool. There can be a maximum of 20 files associated with the tool.</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>VectorStoresForFileSearch</maml:name> <maml:description> <maml:para>The vector store attached to this thread. There can be a maximum of 1 vector store attached to the thread.</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>FileIdsForFileSearch</maml:name> <maml:description> <maml:para>A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.</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>MetaData</maml:name> <maml:description> <maml:para>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> $Thread = New-Thread</dev:code> <dev:remarks> <maml:para>Create a new thread.</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-Thread.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/threads/createThread</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/threads/createThread</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-VectorStore</command:name> <command:verb>New</command:verb> <command:noun>VectorStore</command:noun> <maml:description> <maml:para>Create a vector store.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Create a vector store.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-VectorStore</maml:name> <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 vector store.</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="file_ids"> <maml:name>FileId</maml:name> <maml:description> <maml:para>A list of File IDs that the vector store should use.</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>ExpiresAfterDays</maml:name> <maml:description> <maml:para>The number of days after the anchor time that the vector store will expire.</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>ExpiresAfterAnchor</maml:name> <maml:description> <maml:para>Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.</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>last_active_at</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="chunking_strategy"> <maml:name>ChunkingStrategy</maml:name> <maml:description> <maml:para>The chunking strategy used to chunk the file(s). If not set, will use the "auto" strategy. Only applicable if FileId is non-empty.</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_chunk_size_tokens"> <maml:name>MaxChunkSizeTokens</maml:name> <maml:description> <maml:para>The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096. Note that the parameter only acceptable when the ChunkingStrategy is "static".</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>800</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="chunk_overlap_tokens"> <maml:name>ChunkOverlapTokens</maml:name> <maml:description> <maml:para>The number of tokens that overlap between chunks. The default value is 400. The value must not exceed half of MaxChunkSizeTokens. Note that the parameter only acceptable when the ChunkingStrategy is "static".</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>400</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>MetaData</maml:name> <maml:description> <maml:para>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="false" position="named" aliases="none"> <maml:name>Name</maml:name> <maml:description> <maml:para>The name of the vector store.</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="file_ids"> <maml:name>FileId</maml:name> <maml:description> <maml:para>A list of File IDs that the vector store should use.</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>ExpiresAfterDays</maml:name> <maml:description> <maml:para>The number of days after the anchor time that the vector store will expire.</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>ExpiresAfterAnchor</maml:name> <maml:description> <maml:para>Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.</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>last_active_at</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="chunking_strategy"> <maml:name>ChunkingStrategy</maml:name> <maml:description> <maml:para>The chunking strategy used to chunk the file(s). If not set, will use the "auto" strategy. Only applicable if FileId is non-empty.</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_chunk_size_tokens"> <maml:name>MaxChunkSizeTokens</maml:name> <maml:description> <maml:para>The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096. Note that the parameter only acceptable when the ChunkingStrategy is "static".</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>800</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="chunk_overlap_tokens"> <maml:name>ChunkOverlapTokens</maml:name> <maml:description> <maml:para>The number of tokens that overlap between chunks. The default value is 400. The value must not exceed half of MaxChunkSizeTokens. Note that the parameter only acceptable when the ChunkingStrategy is "static".</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>400</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>MetaData</maml:name> <maml:description> <maml:para>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> New-VectorStore -Name "Test-Store-X"</dev:code> <dev:remarks> <maml:para>Creates a new vector store that the name has.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> New-VectorStore -Name "Test-Store-X" -FileId ('file-abc123', 'file-def456', 'file-ghi789')</dev:code> <dev:remarks> <maml:para>Creates a new vector store with attached 3 files.</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-VectorStore.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/vector-stores/create</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/vector-stores/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>Receive-ThreadRun</command:name> <command:verb>Receive</command:verb> <command:noun>ThreadRun</command:noun> <maml:description> <maml:para>Gets the results of the Run.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Gets the results of the Run. Return is a Thread object.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Receive-ThreadRun</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="run_id"> <maml:name>RunId</maml:name> <maml:description> <maml:para>The ID of the run to retrieve.</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="True (ByPropertyName)" position="1" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the thread that was run.</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>Wait</maml:name> <maml:description> <maml:para>When the Wait switch is used, it waits until that Run is completed and then returns the result.</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>AutoRemoveThread</maml:name> <maml:description> <maml:para>Remove the Thread associated with the Run after retrieving the results of the Run.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="run_id"> <maml:name>RunId</maml:name> <maml:description> <maml:para>The ID of the run to retrieve.</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="True (ByPropertyName)" position="1" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the thread that was run.</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>Wait</maml:name> <maml:description> <maml:para>When the Wait switch is used, it waits until that Run is completed and then returns the result.</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>AutoRemoveThread</maml:name> <maml:description> <maml:para>Remove the Thread associated with the Run after retrieving the results of the 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: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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> Get-ThreadRun -RunId 'run_abc123' -ThreadId 'thread_abc123' | Receive-ThreadRun</dev:code> <dev:remarks> <maml:para>Gets the results of the specified Run.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Start-ThreadRun -ThreadId 'thread_abc123' | Receive-ThreadRun -Wait</dev:code> <dev:remarks> <maml:para>When the Wait switch is used, it waits until that Run is completed and then returns the result.</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/Receive-ThreadRun.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-Assistant</command:name> <command:verb>Remove</command:verb> <command:noun>Assistant</command:noun> <maml:description> <maml:para>Delete an assistant.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Delete an assistant.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Remove-Assistant</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="assistant_id"> <maml:name>AssistantId</maml:name> <maml:description> <maml:para>Specifies ID of an 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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="assistant_id"> <maml:name>AssistantId</maml:name> <maml:description> <maml:para>Specifies ID of an 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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 /> <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:\> Remove-Assistant -AssistantId 'asst_abc123'</dev:code> <dev:remarks> <maml:para>Remove an assistant that has the ID with `asst_abc123`</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Get-Assistant -All | Remove-Assistant</dev:code> <dev:remarks> <maml:para>Remove all assistants.</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-Assistant.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/assistants/deleteAssistant</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/assistants/deleteAssistant</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-OpenAIFile</command:name> <command:verb>Remove</command:verb> <command:noun>OpenAIFile</command:noun> <maml:description> <maml:para>Delete a file.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Delete a file.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Remove-OpenAIFile</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="file_id, Id"> <maml:name>FileId</maml:name> <maml:description> <maml:para>The ID of the file to use for this request.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="file_id, Id"> <maml:name>FileId</maml:name> <maml:description> <maml:para>The ID of the file to use for this request.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 /> <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:\> Remove-OpenAIFile -FileId 'file-abc123'</dev:code> <dev:remarks> <maml:para>Remove a file that has the ID `file-abc123`</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-OpenAIFile.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/files/delete</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/files/delete</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-RealtimeSessionItem</command:name> <command:verb>Remove</command:verb> <command:noun>RealtimeSessionItem</command:noun> <maml:description> <maml:para>Remove an item from the conversation history.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Remove an item from the conversation history.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Remove-RealtimeSessionItem</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>ItemId</maml:name> <maml:description> <maml:para>The ID of the item to delete.</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>EventId</maml:name> <maml:description> <maml:para>Optional client-generated ID used to identify this event.</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="none"> <maml:name>ItemId</maml:name> <maml:description> <maml:para>The ID of the item to delete.</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>EventId</maml:name> <maml:description> <maml:para>Optional client-generated ID used to identify this event.</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 /> <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:\> Remove-RealtimeSessionItem -ItemId 'msg_001'</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-RealtimeSessionItem.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/realtime-client-events/conversation/item/delete</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/realtime-client-events/conversation/item/delete</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-Thread</command:name> <command:verb>Remove</command:verb> <command:noun>Thread</command:noun> <maml:description> <maml:para>Delete a thread.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Delete a thread.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Remove-Thread</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the thread to delete.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the thread to delete.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 /> <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:\> Remove-Thread -ThreadId 'thread_abc13'</dev:code> <dev:remarks> <maml:para>Remove a thread that has the ID with `thread_abc13`</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-Thread.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/threads/deleteThread</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/threads/deleteThread</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-ThreadMessage</command:name> <command:verb>Remove</command:verb> <command:noun>ThreadMessage</command:noun> <maml:description> <maml:para>Deletes a Message of the Thread.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Deletes a Message of the Thread.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Remove-ThreadMessage</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="0" aliases="message_id"> <maml:name>MessageId</maml:name> <maml:description> <maml:para>The ID of the Message to delete.</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="True (ByPropertyName, ByValue)" position="named" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the Thread.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="named" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the Thread.</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="True (ByPropertyName)" position="0" aliases="message_id"> <maml:name>MessageId</maml:name> <maml:description> <maml:para>The ID of the Message to delete.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> Remove-ThreadMessage -ThreadId 'thread_abc123' -MessageId 'msg_abc123'</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-ThreadMessage.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-VectorStore</command:name> <command:verb>Remove</command:verb> <command:noun>VectorStore</command:noun> <maml:description> <maml:para>Delete a vector store.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Delete a vector store.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Remove-VectorStore</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store to delete.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store to delete.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 /> <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:\> Remove-VectorStore 'vs_abc123'</dev:code> <dev:remarks> <maml:para>Delete a vector store with ID `vs_abc123`.</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-VectorStore.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/vector-stores/delete</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/vector-stores/delete</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-VectorStoreFile</command:name> <command:verb>Remove</command:verb> <command:noun>VectorStoreFile</command:noun> <maml:description> <maml:para>Delete a vector store file.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use `Remove-OpenAIFile`.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Remove-VectorStoreFile</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store that the file belongs to.</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="True (ByPropertyName)" position="1" aliases="file_id"> <maml:name>FileId</maml:name> <maml:description> <maml:para>The ID of the file being removed.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store that the file belongs to.</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="True (ByPropertyName)" position="1" aliases="file_id"> <maml:name>FileId</maml:name> <maml:description> <maml:para>The ID of the file being removed.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 /> <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:\> Remove-VectorStoreFile -VectorStoreId 'vs_abc123' -FileId 'file-abc123'</dev:code> <dev:remarks> <maml:para>Deletes a file with ID `file-abc123` from the vector store with ID `vs_ab123`</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-VectorStoreFile.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/vector-stores-files/deleteFile</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/vector-stores-files/deleteFile</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-AudioSpeech</command:name> <command:verb>Request</command:verb> <command:noun>AudioSpeech</command:noun> <maml:description> <maml:para>Generates audio from the input text.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Generates audio from the input text. https://platform.openai.com/docs/guides/text-to-speech</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Request-AudioSpeech</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="Input"> <maml:name>Text</maml:name> <maml:description> <maml:para>(Required) The text to generate audio for. The maximum length is 4096 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>One of the available TTS models: `tts-1` or `tts-1-hd` The default value is `tts-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>tts-1</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Voice</maml:name> <maml:description> <maml:para>The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. The default value is `alloy`.</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>alloy</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 audio. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`</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>OutFile</maml:name> <maml:description> <maml:para>(Required) The path of the file to save.</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>Speed</maml:name> <maml:description> <maml:para>The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.</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>1.0</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="Input"> <maml:name>Text</maml:name> <maml:description> <maml:para>(Required) The text to generate audio for. The maximum length is 4096 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>One of the available TTS models: `tts-1` or `tts-1-hd` The default value is `tts-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>tts-1</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Voice</maml:name> <maml:description> <maml:para>The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. The default value is `alloy`.</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>alloy</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 audio. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`</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>OutFile</maml:name> <maml:description> <maml:para>(Required) The path of the file to save.</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>Speed</maml:name> <maml:description> <maml:para>The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default.</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>1.0</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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>[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: Text-to-Speech (Basic) --------------</maml:title> <dev:code>Request-AudioSpeech -Text 'Hello.' -OutFile 'C:\sample\audio.mp3'</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> <command:example> <maml:title>------------- Example 2: Text-to-Speech (Options) -------------</maml:title> <dev:code>Request-AudioSpeech ` -Text 'The quick brown fox jumped over the lazy dog.' ` -OutFile 'C:\sample\audio.aac' ` -Model tts-1-hd ` -Voice Onyx ` -Speed 1.2</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-AudioSpeech.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/guides/text-to-speech</maml:linkText> <maml:uri>https://platform.openai.com/docs/guides/text-to-speech</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/audio/createSpeech</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/audio/createSpeech</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: `flac`, `mp3`, `mp4`, `mpeg`, `mpga`, `m4a`, `ogg`, `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="timestamp_granularities"> <maml:name>TimestampGranularities</maml:name> <maml:description> <maml:para>The timestamp granularities to populate for this transcription. Any of these options: `word`, or `segment`. The default is `segment`.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="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: `flac`, `mp3`, `mp4`, `mpeg`, `mpga`, `m4a`, `ogg`, `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="timestamp_granularities"> <maml:name>TimestampGranularities</maml:name> <maml:description> <maml:para>The timestamp granularities to populate for this transcription. Any of these options: `word`, or `segment`. The default is `segment`.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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>[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:\> 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: `flac`, `mp3`, `mp4`, `mpeg`, `mpga`, `m4a`, `ogg`, `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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="none"> <maml:name>File</maml:name> <maml:description> <maml:para>(Required) The audio file to translate, in one of these formats: `flac`, `mp3`, `mp4`, `mpeg`, `mpga`, `m4a`, `ogg`, `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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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>[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-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>Role</maml:name> <maml:description> <maml:para>The role of the messages author. One of `user`, `system`, or `function`. The default is `user`.</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, RolePrompt"> <maml:name>SystemMessage</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>Modalities</maml:name> <maml:description> <maml:para>Output types that you would like the model to generate for this request. Some models can generate both text and audio. To request that responses, you can specify: `("text", "audio")`</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>Voice</maml:name> <maml:description> <maml:para>The voice the model uses to respond.</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_audio"> <maml:name>InputAudio</maml:name> <maml:description> <maml:para>The path of the audio file to passing the model. Supported formats are `wav` and `mp3`.</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>InputAudioFormat</maml:name> <maml:description> <maml:para>Specifies the format of the input audio file. If not specified, the format is automatically determined from the file extension.</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>AudioOutFile</maml:name> <maml:description> <maml:para>Specifies where audio response from the model will be saved. If the model does not return a audio response, nothing is saved.</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>OutputAudioFormat</maml:name> <maml:description> <maml:para>Specifies the format of the output audio file. The default value is `mp3`.</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>Images</maml:name> <maml:description> <maml:para>An array of images to passing the model. You can specifies local image file or remote url. </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>ImageDetail</maml:name> <maml:description> <maml:para>Controls how the model processes the image and generates its textual understanding. You can select from `Low` or `High`. See more details : https://platform.openai.com/docs/guides/vision/low-or-high-fidelity-image-understanding</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>Auto</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Tools</maml:name> <maml:description> <maml:para>A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. https://github.com/mkht/PSOpenAI/blob/main/Guides/How_to_call_functions_with_ChatGPT.ipynb</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.Collections.IDictionary[]</command:parameterValue> <dev:type> <maml:name>System.Collections.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="tool_choice"> <maml:name>ToolChoice</maml:name> <maml:description> <maml:para>Controls how the model responds to function calls. - `none` means the model does not call a function, and responds to the end-user. - `auto` means the model can pick between an end-user or calling a function. Specifying a particular function via `@{type = "function"; function = @{name = "my_function"}}` forces the model to call that function.</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="parallel_tool_calls"> <maml:name>ParallelToolCalls</maml:name> <maml:description> <maml:para>Whether to enable parallel function calling during tool use. The default is true (enabled)</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>True</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>InvokeTools</maml:name> <maml:description> <maml:para>Selects the action to be taken when the GPT model requests a function call. - `None`: The requested function is not executed. This is the default. - `Auto`: Automatically executes the requested function. - `Confirm`: Displays a confirmation to the user before executing the requested function.</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>Prediction</maml:name> <maml:description> <maml:para>Static predicted output content, such as the content of a text file that is being regenerated.</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="none"> <maml:name>Store</maml:name> <maml:description> <maml:para>Whether or not to store the output of this chat completion request for use in model distillation or evals.</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>MetaData</maml:name> <maml:description> <maml:para>Developer-defined tags and values used for filtering completions in the dashboard.</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="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>This value is now deprecated in favor of MaxCompletionTokens.</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="max_completion_tokens"> <maml:name>MaxCompletionTokens</maml:name> <maml:description> <maml:para>An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.</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>LogProbs</maml:name> <maml:description> <maml:para>Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.</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>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="top_logprobs"> <maml:name>TopLogProbs</maml:name> <maml:description> <maml:para>An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.</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="response_format"> <maml:name>Format</maml:name> <maml:description> <maml:para>Specifies the format that the model must output. - `text` is default. - `json_object` enables JSON mode, which ensures the message the model generates is valid JSON. - `json_schema` enables Structured Outputs which ensures the model will match your supplied JSON schema.</maml:para> <maml:para>- `raw_response` returns raw response content from API.</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>JsonSchema</maml:name> <maml:description> <maml:para>Specifies an object or data structure to represent the JSON Schema that the model should be constrained to follow. Required if `json_schema` is specified for `-Format`. Otherwise, it is ignored.</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>Seed</maml:name> <maml:description> <maml:para>If specified, the system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int64</command:parameterValue> <dev:type> <maml:name>Int64</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="service_tier"> <maml:name>ServiceTier</maml:name> <maml:description> <maml:para>Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service.</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>AsBatch</maml:name> <maml:description> <maml:para>If this is specified, this cmdlet returns an object for Batch input It does not perform an API request to OpenAI. It is useful with `Start-Batch` 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>CustomBatchId</maml:name> <maml:description> <maml:para>A unique id that will be used to match outputs to inputs of batch. Must be unique for each request in a batch. This parameter is valid only when the `-AsBatch` swicth is used. Otherwise, it is simply ignored.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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: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>Role</maml:name> <maml:description> <maml:para>The role of the messages author. One of `user`, `system`, or `function`. The default is `user`.</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, RolePrompt"> <maml:name>SystemMessage</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>Modalities</maml:name> <maml:description> <maml:para>Output types that you would like the model to generate for this request. Some models can generate both text and audio. To request that responses, you can specify: `("text", "audio")`</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>Voice</maml:name> <maml:description> <maml:para>The voice the model uses to respond.</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_audio"> <maml:name>InputAudio</maml:name> <maml:description> <maml:para>The path of the audio file to passing the model. Supported formats are `wav` and `mp3`.</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>InputAudioFormat</maml:name> <maml:description> <maml:para>Specifies the format of the input audio file. If not specified, the format is automatically determined from the file extension.</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>AudioOutFile</maml:name> <maml:description> <maml:para>Specifies where audio response from the model will be saved. If the model does not return a audio response, nothing is saved.</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>OutputAudioFormat</maml:name> <maml:description> <maml:para>Specifies the format of the output audio file. The default value is `mp3`.</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>Images</maml:name> <maml:description> <maml:para>An array of images to passing the model. You can specifies local image file or remote url. </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>ImageDetail</maml:name> <maml:description> <maml:para>Controls how the model processes the image and generates its textual understanding. You can select from `Low` or `High`. See more details : https://platform.openai.com/docs/guides/vision/low-or-high-fidelity-image-understanding</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>Auto</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Tools</maml:name> <maml:description> <maml:para>A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. https://github.com/mkht/PSOpenAI/blob/main/Guides/How_to_call_functions_with_ChatGPT.ipynb</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">System.Collections.IDictionary[]</command:parameterValue> <dev:type> <maml:name>System.Collections.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="tool_choice"> <maml:name>ToolChoice</maml:name> <maml:description> <maml:para>Controls how the model responds to function calls. - `none` means the model does not call a function, and responds to the end-user. - `auto` means the model can pick between an end-user or calling a function. Specifying a particular function via `@{type = "function"; function = @{name = "my_function"}}` forces the model to call that function.</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="parallel_tool_calls"> <maml:name>ParallelToolCalls</maml:name> <maml:description> <maml:para>Whether to enable parallel function calling during tool use. The default is true (enabled)</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>True</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>InvokeTools</maml:name> <maml:description> <maml:para>Selects the action to be taken when the GPT model requests a function call. - `None`: The requested function is not executed. This is the default. - `Auto`: Automatically executes the requested function. - `Confirm`: Displays a confirmation to the user before executing the requested function.</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>Prediction</maml:name> <maml:description> <maml:para>Static predicted output content, such as the content of a text file that is being regenerated.</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="none"> <maml:name>Store</maml:name> <maml:description> <maml:para>Whether or not to store the output of this chat completion request for use in model distillation or evals.</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>MetaData</maml:name> <maml:description> <maml:para>Developer-defined tags and values used for filtering completions in the dashboard.</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="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>This value is now deprecated in favor of MaxCompletionTokens.</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="max_completion_tokens"> <maml:name>MaxCompletionTokens</maml:name> <maml:description> <maml:para>An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.</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>LogProbs</maml:name> <maml:description> <maml:para>Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.</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>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="top_logprobs"> <maml:name>TopLogProbs</maml:name> <maml:description> <maml:para>An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.</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="response_format"> <maml:name>Format</maml:name> <maml:description> <maml:para>Specifies the format that the model must output. - `text` is default. - `json_object` enables JSON mode, which ensures the message the model generates is valid JSON. - `json_schema` enables Structured Outputs which ensures the model will match your supplied JSON schema.</maml:para> <maml:para>- `raw_response` returns raw response content from API.</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>JsonSchema</maml:name> <maml:description> <maml:para>Specifies an object or data structure to represent the JSON Schema that the model should be constrained to follow. Required if `json_schema` is specified for `-Format`. Otherwise, it is ignored.</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>Seed</maml:name> <maml:description> <maml:para>If specified, the system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Int64</command:parameterValue> <dev:type> <maml:name>Int64</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="service_tier"> <maml:name>ServiceTier</maml:name> <maml:description> <maml:para>Specifies the latency tier to use for processing the request. This parameter is relevant for customers subscribed to the scale tier service.</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>AsBatch</maml:name> <maml:description> <maml:para>If this is specified, this cmdlet returns an object for Batch input It does not perform an API request to OpenAI. It is useful with `Start-Batch` 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>CustomBatchId</maml:name> <maml:description> <maml:para>A unique id that will be used to match outputs to inputs of batch. Must be unique for each request in a batch. This parameter is valid only when the `-AsBatch` swicth is used. Otherwise, it is simply ignored.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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: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:\> Request-ChatCompletion -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> $FirstQA = Request-ChatCompletion -Message "What is the population of the United States?" PS> $FirstQA.Answer As of September 2021, the estimated population of the United States is around 331.4 million people. PS\> $SecondQA = $FirstQA | Request-ChatCompletion -Message "Translate the previous answer into French." PS\> $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:\> Request-ChatCompletion '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:example> <maml:title>----------------- Example 4: Function calling -----------------</maml:title> <dev:code>PS C:\> $PingFunction = New-ChatCompletionFunction -Command 'Test-Connection' -IncludeParameters ('TargetName','Count') PS C:\> $Message = 'Ping the Google Public DNS address three times and briefly report the results.' PS C:\> $GPTPingAnswer = Request-ChatCompletion -Message $Message -Model gpt-4o -Tools $PingFunction -InvokeTools Auto PS C:\> $GPTPingAnswer | select Answer</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> <command:example> <maml:title>--------------- Example 5: Image input (Vision) ---------------</maml:title> <dev:code>PS C:\> Request-ChatCompletion -Message $Message -Model gpt-4o -Images "C:\image.png"</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> <command:example> <maml:title>--------------- Example 6: Audio input / output ---------------</maml:title> <dev:code>PS C:\> Request-ChatCompletion -Modalities text, audio -InputAudio 'C:\hello.mp3' -AudioOutFile 'C:\response.mp3' -Model gpt-4o-audio-preview</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-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>Format</maml:name> <maml:description> <maml:para>The format to return the embeddings in. Can be either `float` or `base64` The default value is `float`.</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>float</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Dimensions</maml:name> <maml:description> <maml:para>The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later 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>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>AsBatch</maml:name> <maml:description> <maml:para>If this is specified, this cmdlet returns an object for Batch input It does not perform an API request to OpenAI. It is useful with `Start-Batch` 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>CustomBatchId</maml:name> <maml:description> <maml:para>A unique id that will be used to match outputs to inputs of batch. Must be unique for each request in a batch. This parameter is valid only when the `-AsBatch` swicth is used. Otherwise, it is simply ignored.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="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>Format</maml:name> <maml:description> <maml:para>The format to return the embeddings in. Can be either `float` or `base64` The default value is `float`.</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>float</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Dimensions</maml:name> <maml:description> <maml:para>The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later 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>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>AsBatch</maml:name> <maml:description> <maml:para>If this is specified, this cmdlet returns an object for Batch input It does not perform an API request to OpenAI. It is useful with `Start-Batch` 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>CustomBatchId</maml:name> <maml:description> <maml:para>A unique id that will be used to match outputs to inputs of batch. Must be unique for each request in a batch. This parameter is valid only when the `-AsBatch` swicth is used. Otherwise, it is simply ignored.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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: 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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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: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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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>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). </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 model to use for image generation. The default is `dall-e-2`</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>dall-e-2</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. For `dall-e-3`, only `1` is supported.</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` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models. 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="none"> <maml:name>Quality</maml:name> <maml:description> <maml:para>The quality of the image that will be generated. `hd` creates images with finer details and greater consistency across the image. This param is only supported for `dall-e-3`.</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>Style</maml:name> <maml:description> <maml:para>The style of the generated images. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for `dall-e-3`.</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>vivid</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`, `byte` or `raw_response`.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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: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). </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 model to use for image generation. The default is `dall-e-2`</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>dall-e-2</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. For `dall-e-3`, only `1` is supported.</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` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models. 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="none"> <maml:name>Quality</maml:name> <maml:description> <maml:para>The quality of the image that will be generated. `hd` creates images with finer details and greater consistency across the image. This param is only supported for `dall-e-3`.</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>Style</maml:name> <maml:description> <maml:para>The style of the generated images. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for `dall-e-3`.</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>vivid</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="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). </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 model to use for image generation. The default is `dall-e-2`</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>dall-e-2</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. For `dall-e-3`, only `1` is supported.</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` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models. 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="none"> <maml:name>Quality</maml:name> <maml:description> <maml:para>The quality of the image that will be generated. `hd` creates images with finer details and greater consistency across the image. This param is only supported for `dall-e-3`.</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>Style</maml:name> <maml:description> <maml:para>The style of the generated images. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for `dall-e-3`.</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>vivid</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`, `byte` or `raw_response`.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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>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>Format = raw_response : string</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' -Model dall-e-2 -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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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: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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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>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="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="Input"> <maml:name>Text</maml:name> <maml:description> <maml:para>A string of text to classify for moderation.</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>Images</maml:name> <maml:description> <maml:para>An array of images to passing the model. You can specifies local image file or remote url. </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-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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="Input"> <maml:name>Text</maml:name> <maml:description> <maml:para>A string of text to classify for moderation.</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>Images</maml:name> <maml:description> <maml:para>An array of images to passing the model. You can specifies local image file or remote url. </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-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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> $Result = Request-Moderation -Text "I want to kill them." PS C:\> $Result.results[0].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-RealtimeSessionResponse</command:name> <command:verb>Request</command:verb> <command:noun>RealtimeSessionResponse</command:noun> <maml:description> <maml:para>Instruct the server to generate a response.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Instruct the server to generate a response. When automatic turn detection by the server is enabled, this is usually not necessary. If turn detection is disabled, use this command to request a response from the server.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Request-RealtimeSessionResponse</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>EventId</maml:name> <maml:description> <maml:para>Optional client-generated ID used to identify this event.</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>Instructions</maml:name> <maml:description> <maml:para>Instructions for the model.</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>MaxOutputTokens</maml:name> <maml:description> <maml:para>Maximum number of output tokens for a single assistant response. Provide an integer between 1 and 4096 to limit output tokens, or -1 for no limitations.</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>Modalities</maml:name> <maml:description> <maml:para>The set of modalities the model can respond with.</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">text</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">audio</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>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>OutputAudioFormat</maml:name> <maml:description> <maml:para>The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.</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>Sampling temperature for the model, limited to [0.6, 1.2].</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Single</command:parameterValue> <dev:type> <maml:name>Single</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>Voice</maml:name> <maml:description> <maml:para>The voice the model uses to respond.</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="false" position="named" aliases="none"> <maml:name>EventId</maml:name> <maml:description> <maml:para>Optional client-generated ID used to identify this event.</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>Instructions</maml:name> <maml:description> <maml:para>Instructions for the model.</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>MaxOutputTokens</maml:name> <maml:description> <maml:para>Maximum number of output tokens for a single assistant response. Provide an integer between 1 and 4096 to limit output tokens, or -1 for no limitations.</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>Modalities</maml:name> <maml:description> <maml:para>The set of modalities the model can respond with.</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>OutputAudioFormat</maml:name> <maml:description> <maml:para>The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.</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>Sampling temperature for the model, limited to [0.6, 1.2].</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Single</command:parameterValue> <dev:type> <maml:name>Single</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>Voice</maml:name> <maml:description> <maml:para>The voice the model uses to respond.</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 /> <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:\> Request-RealtimeSessionResponse</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-RealtimeSessionResponse.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/realtime-client-events/response/create</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/realtime-client-events/response/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-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 `gpt-3.5-turbo-instruct`.</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-instruct</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>AsBatch</maml:name> <maml:description> <maml:para>If this is specified, this cmdlet returns an object for Batch input It does not perform an API request to OpenAI. It is useful with `Start-Batch` 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>CustomBatchId</maml:name> <maml:description> <maml:para>A unique id that will be used to match outputs to inputs of batch. Must be unique for each request in a batch. This parameter is valid only when the `-AsBatch` swicth is used. Otherwise, it is simply ignored.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="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 `gpt-3.5-turbo-instruct`.</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-instruct</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>AsBatch</maml:name> <maml:description> <maml:para>If this is specified, this cmdlet returns an object for Batch input It does not perform an API request to OpenAI. It is useful with `Start-Batch` 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>CustomBatchId</maml:name> <maml:description> <maml:para>A unique id that will be used to match outputs to inputs of batch. Must be unique for each request in a batch. This parameter is valid only when the `-AsBatch` swicth is used. Otherwise, it is simply ignored.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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: 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>Send-RealtimeSessionEvent</command:name> <command:verb>Send</command:verb> <command:noun>RealtimeSessionEvent</command:noun> <maml:description> <maml:para>Send any client event to the server.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Sends an arbitrary message expressed as a JSON string to the session. This is useful for sending custom events that PSOpenAI does not support in its functions.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Send-RealtimeSessionEvent</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>Message</maml:name> <maml:description> <maml:para>JSON-formatted message.</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>Message</maml:name> <maml:description> <maml:para>JSON-formatted message.</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 /> <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:\> Send-RealtimeSessionEvent -Message '{"event_id": "event_567", "type": "response.cancel"}'</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/Send-RealtimeSessionEvent.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/realtime-client-events</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/realtime-client-events</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>Set-Assistant</command:name> <command:verb>Set</command:verb> <command:noun>Assistant</command:noun> <maml:description> <maml:para>Modifies an assistant.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Modifies an assistant.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Set-Assistant</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="assistant_id"> <maml:name>AssistantId</maml:name> <maml:description> <maml:para>Specifies ID of an 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>Name</maml:name> <maml:description> <maml:para>The name of the assistant. The maximum length is 256 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>ID of the 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="none"> <maml:name>Description</maml:name> <maml:description> <maml:para>The description of the assistant. The maximum length is 512 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>Instructions</maml:name> <maml:description> <maml:para>The system instructions that the assistant uses. The maximum length is 256,000 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>UseCodeInterpreter</maml:name> <maml:description> <maml:para>Specifies Whether the code interpreter tool enable or not. The default is `$false`.</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>UseFileSearch</maml:name> <maml:description> <maml:para>Specifies Whether the file_search tool enable or not. The default is `$false`.</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>Functions</maml:name> <maml:description> <maml:para>A list of functions the model may call. Use this to provide a list of functions the model may generate JSON inputs for. </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>FileIdsForCodeInterpreter</maml:name> <maml:description> <maml:para>A list of file IDs made available to the code_interpreter tool. There can be a maximum of 20 files associated with the tool.</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>VectorStoresForFileSearch</maml:name> <maml:description> <maml:para>The vector store attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.</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>MaxNumberOfFileSearchResults</maml:name> <maml:description> <maml:para>The maximum number of results the file search tool should output. This number should be between 1 and 50 inclusive.</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>RankerForFileSearch</maml:name> <maml:description> <maml:para>The ranker to use for the file search. If not specified will use the auto ranker.</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>ScoreThresholdForFileSearch</maml:name> <maml:description> <maml:para>The score threshold for the file search. All values must be a floating point number between 0 and 1.</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>FileIdsForFileSearch</maml:name> <maml:description> <maml:para>A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.</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>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="none"> <maml:name>MetaData</maml:name> <maml:description> <maml:para>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.</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="response_format"> <maml:name>Format</maml:name> <maml:description> <maml:para>Specifies the format that the model must output. - `auto` is default. - `json_object` enables JSON mode, which ensures the message the model generates is valid JSON. - `json_schema` enables Structured Outputs which ensures the model will match your supplied JSON schema.</maml:para> <maml:para>- `raw_response` returns raw response content from API.</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>JsonSchema</maml:name> <maml:description> <maml:para>Specifies an object or data structure to represent the JSON Schema that the model should be constrained to follow. Required if `json_schema` is specified for `-Format`. Otherwise, it is ignored.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="assistant_id"> <maml:name>AssistantId</maml:name> <maml:description> <maml:para>Specifies ID of an 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>Name</maml:name> <maml:description> <maml:para>The name of the assistant. The maximum length is 256 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>ID of the 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="none"> <maml:name>Description</maml:name> <maml:description> <maml:para>The description of the assistant. The maximum length is 512 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>Instructions</maml:name> <maml:description> <maml:para>The system instructions that the assistant uses. The maximum length is 256,000 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>UseCodeInterpreter</maml:name> <maml:description> <maml:para>Specifies Whether the code interpreter tool enable or not. The default is `$false`.</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>UseFileSearch</maml:name> <maml:description> <maml:para>Specifies Whether the file_search tool enable or not. The default is `$false`.</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>Functions</maml:name> <maml:description> <maml:para>A list of functions the model may call. Use this to provide a list of functions the model may generate JSON inputs for. </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>FileIdsForCodeInterpreter</maml:name> <maml:description> <maml:para>A list of file IDs made available to the code_interpreter tool. There can be a maximum of 20 files associated with the tool.</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>VectorStoresForFileSearch</maml:name> <maml:description> <maml:para>The vector store attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.</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>MaxNumberOfFileSearchResults</maml:name> <maml:description> <maml:para>The maximum number of results the file search tool should output. This number should be between 1 and 50 inclusive.</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>RankerForFileSearch</maml:name> <maml:description> <maml:para>The ranker to use for the file search. If not specified will use the auto ranker.</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>ScoreThresholdForFileSearch</maml:name> <maml:description> <maml:para>The score threshold for the file search. All values must be a floating point number between 0 and 1.</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>FileIdsForFileSearch</maml:name> <maml:description> <maml:para>A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.</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>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="none"> <maml:name>MetaData</maml:name> <maml:description> <maml:para>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.</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="response_format"> <maml:name>Format</maml:name> <maml:description> <maml:para>Specifies the format that the model must output. - `auto` is default. - `json_object` enables JSON mode, which ensures the message the model generates is valid JSON. - `json_schema` enables Structured Outputs which ensures the model will match your supplied JSON schema.</maml:para> <maml:para>- `raw_response` returns raw response content from API.</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>JsonSchema</maml:name> <maml:description> <maml:para>Specifies an object or data structure to represent the JSON Schema that the model should be constrained to follow. Required if `json_schema` is specified for `-Format`. Otherwise, it is ignored.</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> $Assistant = Set-Assistant -AssistantId 'asst_abc123' -Instructions "You are a math teacher." -UseCodeInterpreter $true</dev:code> <dev:remarks> <maml:para>Modifies the assistant that has ID with `asst_abc123`.</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/Set-Assistant.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/assistants/modifyAssistant</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/assistants/modifyAssistant</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/assistants/overview/</maml:linkText> <maml:uri>https://platform.openai.com/docs/assistants/overview/</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>Set-OpenAIContext</command:name> <command:verb>Set</command:verb> <command:noun>OpenAIContext</command:noun> <maml:description> <maml:para>Sets common parameters that are implicitly used when executing functions.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Parameters set in the context are implicitly used when each function is executed. This eliminates the need to specify the same parameters repeatedly. Any parameters explicitly specified for each function take precedence over those set in the context.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Set-OpenAIContext</maml:name> <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. API key specified in the context take precedence over environment and global variables.</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>ApiType</maml:name> <maml:description> <maml:para>Specify whether to call OpenAI or Azure OpenAI Service. Supported values are "OpenAI" or "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>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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` URL specified in the context take precedence over environment and global variables.</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>Specify a string representing the API version. This is only valid when using the Azure OpenAI Service.</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>AuthType</maml:name> <maml:description> <maml:para>Specify the authentication type to be used. Valid values are "OpenAI", "Azure", or "Azure_AD".</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="OrgId"> <maml:name>Organization</maml:name> <maml:description> <maml:para>Specifies Organization ID which used for an API request. Specified value in the context take precedence over environment and global variables.</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>None</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 : 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. </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:syntaxItem> </command:syntax> <command:parameters> <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. API key specified in the context take precedence over environment and global variables.</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>ApiType</maml:name> <maml:description> <maml:para>Specify whether to call OpenAI or Azure OpenAI Service. Supported values are "OpenAI" or "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>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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` URL specified in the context take precedence over environment and global variables.</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>Specify a string representing the API version. This is only valid when using the Azure OpenAI Service.</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>AuthType</maml:name> <maml:description> <maml:para>Specify the authentication type to be used. Valid values are "OpenAI", "Azure", or "Azure_AD".</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="OrgId"> <maml:name>Organization</maml:name> <maml:description> <maml:para>Specifies Organization ID which used for an API request. Specified value in the context take precedence over environment and global variables.</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>None</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 : 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. </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:parameters> <command:inputTypes /> <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:\> Set-OpenAIContext -ApiType 'Azure' -ApiKey 'AZURE_API_KEY' -ApiBase 'https://my-endpoint.openai.azure.com/' PS C:\> Request-ChatCompletion -Message 'Hello Azure OpenAI'</dev:code> <dev:remarks> <maml:para>Because the context is set to use Azure, Request-ChatCompletion is executed to Azure instead of the default OpenAI.</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/Set-OpenAIContext.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>Set-RealtimeSessionConfiguration</command:name> <command:verb>Set</command:verb> <command:noun>RealtimeSessionConfiguration</command:noun> <maml:description> <maml:para>Set the realtime session's configuration.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Set the realtime session's configuration.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Set-RealtimeSessionConfiguration</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>EnableInputAudioTranscription</maml:name> <maml:description> <maml:para>Enables input audio transcription.</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>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>EnableTurnDetection</maml:name> <maml:description> <maml:para>Enables the server VAD mode. In this mode, the server will run voice activity detection (VAD) over the incoming audio and respond after the end of speech.</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>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>EventId</maml:name> <maml:description> <maml:para>Optional client-generated ID used to identify this event.</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>InputAudioFormat</maml:name> <maml:description> <maml:para>The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.</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>InputAudioTranscriptionModel</maml:name> <maml:description> <maml:para>The model to use for transcription, `whisper-1` is the only currently supported model.</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>Instructions</maml:name> <maml:description> <maml:para>The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses.</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>MaxResponseOutputTokens</maml:name> <maml:description> <maml:para>Maximum number of output tokens for a single assistant response. Provide an integer between 1 and 4096 to limit output tokens, or -1 for no limitations.</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>Modalities</maml:name> <maml:description> <maml:para>The set of modalities the model can respond with.</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">text</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">audio</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>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>OutputAudioFormat</maml:name> <maml:description> <maml:para>The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.</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>Sampling temperature for the model, limited to [0.6, 1.2].</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Single</command:parameterValue> <dev:type> <maml:name>Single</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>ToolChoice</maml:name> <maml:description> <maml:para>How the model chooses tools. Options are `auto`, `none`, `required`, or specify a function.</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>Tools</maml:name> <maml:description> <maml:para>Tools (functions) available to the model.</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>TurnDetectionPrefixPadding</maml:name> <maml:description> <maml:para>Amount of audio to include before the VAD detected speech (in milliseconds).</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>TurnDetectionSilenceDuration</maml:name> <maml:description> <maml:para>Duration of silence to detect speech stop (in milliseconds). With shorter values the model will respond more quickly, but may jump in on short pauses from the user.</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>TurnDetectionThreshold</maml:name> <maml:description> <maml:para>Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher threshold will require louder audio to activate the model, and thus might perform better in noisy environments.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Single</command:parameterValue> <dev:type> <maml:name>Single</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>TurnDetectionType</maml:name> <maml:description> <maml:para>Type of turn detection, only `server_vad` is currently supported.</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>server_vad</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Voice</maml:name> <maml:description> <maml:para>The voice the model uses to respond. Cannot be changed once the model has responded with audio at least once.</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="false" position="named" aliases="none"> <maml:name>EnableInputAudioTranscription</maml:name> <maml:description> <maml:para>Enables input audio transcription.</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>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>EnableTurnDetection</maml:name> <maml:description> <maml:para>Enables the server VAD mode. In this mode, the server will run voice activity detection (VAD) over the incoming audio and respond after the end of speech.</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>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>EventId</maml:name> <maml:description> <maml:para>Optional client-generated ID used to identify this event.</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>InputAudioFormat</maml:name> <maml:description> <maml:para>The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.</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>InputAudioTranscriptionModel</maml:name> <maml:description> <maml:para>The model to use for transcription, `whisper-1` is the only currently supported model.</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>Instructions</maml:name> <maml:description> <maml:para>The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses.</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>MaxResponseOutputTokens</maml:name> <maml:description> <maml:para>Maximum number of output tokens for a single assistant response. Provide an integer between 1 and 4096 to limit output tokens, or -1 for no limitations.</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>Modalities</maml:name> <maml:description> <maml:para>The set of modalities the model can respond with.</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>OutputAudioFormat</maml:name> <maml:description> <maml:para>The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.</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>Sampling temperature for the model, limited to [0.6, 1.2].</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Single</command:parameterValue> <dev:type> <maml:name>Single</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>ToolChoice</maml:name> <maml:description> <maml:para>How the model chooses tools. Options are `auto`, `none`, `required`, or specify a function.</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>Tools</maml:name> <maml:description> <maml:para>Tools (functions) available to the model.</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>TurnDetectionPrefixPadding</maml:name> <maml:description> <maml:para>Amount of audio to include before the VAD detected speech (in milliseconds).</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>TurnDetectionSilenceDuration</maml:name> <maml:description> <maml:para>Duration of silence to detect speech stop (in milliseconds). With shorter values the model will respond more quickly, but may jump in on short pauses from the user.</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>TurnDetectionThreshold</maml:name> <maml:description> <maml:para>Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A higher threshold will require louder audio to activate the model, and thus might perform better in noisy environments.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Single</command:parameterValue> <dev:type> <maml:name>Single</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>TurnDetectionType</maml:name> <maml:description> <maml:para>Type of turn detection, only `server_vad` is currently supported.</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>server_vad</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Voice</maml:name> <maml:description> <maml:para>The voice the model uses to respond. Cannot be changed once the model has responded with audio at least once.</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 /> <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:\> Set-RealtimeSessionConfiguration ` -Modalities 'text','audio' ` -Voice 'shimmer' ` -EnableInputAudioTranscription $true ` -EnableTurnDetection $true -Temperature 1.0</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/Set-RealtimeSessionConfiguration.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/realtime-client-events/session/update</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/realtime-client-events/session/update</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>Set-Thread</command:name> <command:verb>Set</command:verb> <command:noun>Thread</command:noun> <maml:description> <maml:para>Modifies a thread.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Modifies a thread. Currently only the metadata can be modified.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Set-Thread</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the thread to modify.</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>FileIdsForCodeInterpreter</maml:name> <maml:description> <maml:para>A list of file IDs made available to the code_interpreter tool. There can be a maximum of 20 files associated with the tool.</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>VectorStoresForFileSearch</maml:name> <maml:description> <maml:para>The vector store attached to this thread. There can be a maximum of 1 vector store attached to the thread.</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>FileIdsForFileSearch</maml:name> <maml:description> <maml:para>A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.</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>MetaData</maml:name> <maml:description> <maml:para>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the thread to modify.</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>FileIdsForCodeInterpreter</maml:name> <maml:description> <maml:para>A list of file IDs made available to the code_interpreter tool. There can be a maximum of 20 files associated with the tool.</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>VectorStoresForFileSearch</maml:name> <maml:description> <maml:para>The vector store attached to this thread. There can be a maximum of 1 vector store attached to the thread.</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>FileIdsForFileSearch</maml:name> <maml:description> <maml:para>A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.</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>MetaData</maml:name> <maml:description> <maml:para>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> $Thread = Set-Thread -ThreadId 'thread_abc123' -MetaData $MetaData</dev:code> <dev:remarks> <maml:para>Modifies a thread.</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/Set-Thread.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/threads/modifyThread</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/threads/modifyThread</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>Set-VectorStore</command:name> <command:verb>Set</command:verb> <command:noun>VectorStore</command:noun> <maml:description> <maml:para>Modifies a vector store.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Modifies a vector store.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Set-VectorStore</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store to modify.</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>New name of the vector store.</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>ExpiresAfterDays</maml:name> <maml:description> <maml:para>The number of days after the anchor time that the vector store will expire.</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>ExpiresAfterAnchor</maml:name> <maml:description> <maml:para>Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.</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>last_active_at</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>MetaData</maml:name> <maml:description> <maml:para>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store to modify.</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>New name of the vector store.</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>ExpiresAfterDays</maml:name> <maml:description> <maml:para>The number of days after the anchor time that the vector store will expire.</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>ExpiresAfterAnchor</maml:name> <maml:description> <maml:para>Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.</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>last_active_at</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>MetaData</maml:name> <maml:description> <maml:para>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> Set-VectorStore -VectorStoreId 'vs_abc123' -Name 'NewName-123'</dev:code> <dev:remarks> <maml:para>Modifies a name of vector store.</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/Set-VectorStore.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/vector-stores/modify</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/vector-stores/modify</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>Start-Batch</command:name> <command:verb>Start</command:verb> <command:noun>Batch</command:noun> <maml:description> <maml:para>Creates and executes a batch from an uploaded file or input objects.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Creates and executes a batch from an uploaded file or input objects.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Start-Batch</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="none"> <maml:name>BatchInput</maml:name> <maml:description> <maml:para>Specifies batch input objects.</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="completion_window"> <maml:name>CompletionWindow</maml:name> <maml:description> <maml:para>The time frame within which the batch should be processed. Currently only "24h" is supported.</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>24h</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Endpoint</maml:name> <maml:description> <maml:para>The endpoint to be used for all requests in the batch. Currently "/v1/chat/completions", "/v1/embeddings", and "/v1/completions" are supported.</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>/v1/chat/completions</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>MetaData</maml:name> <maml:description> <maml:para>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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:syntaxItem> <maml:name>Start-Batch</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="input_file_id"> <maml:name>FileId</maml:name> <maml:description> <maml:para>Specifies a input file id that is uploaded on the OpenAI storage 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="completion_window"> <maml:name>CompletionWindow</maml:name> <maml:description> <maml:para>The time frame within which the batch should be processed. Currently only "24h" is supported.</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>24h</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Endpoint</maml:name> <maml:description> <maml:para>The endpoint to be used for all requests in the batch. Currently "/v1/chat/completions", "/v1/embeddings", and "/v1/completions" are supported.</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>/v1/chat/completions</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>MetaData</maml:name> <maml:description> <maml:para>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="none"> <maml:name>BatchInput</maml:name> <maml:description> <maml:para>Specifies batch input objects.</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="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="input_file_id"> <maml:name>FileId</maml:name> <maml:description> <maml:para>Specifies a input file id that is uploaded on the OpenAI storage 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="completion_window"> <maml:name>CompletionWindow</maml:name> <maml:description> <maml:para>The time frame within which the batch should be processed. Currently only "24h" is supported.</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>24h</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Endpoint</maml:name> <maml:description> <maml:para>The endpoint to be used for all requests in the batch. Currently "/v1/chat/completions", "/v1/embeddings", and "/v1/completions" are supported.</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>/v1/chat/completions</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>MetaData</maml:name> <maml:description> <maml:para>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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>This cmdlet will upload Batch input items to the OpenAI storage as a JSONL file implicitly.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Start-Batch -FileId 'file-abc123'</dev:code> <dev:remarks> <maml:para>Creates and executes a batch from an uploaded file. You need to upload formatted jsonl file to the OpenAI storage in advance.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> $BatchInputs = @() PS C:\> $BatchInputs += Request-ChatCompletion -Message 'Good morning.' -Model gpt-4o-mini -AsBatch -CustomBatchId 'custom-1' PS C:\> $BatchInputs += Request-ChatCompletion -Message 'Good night.' -Model gpt-4o-mini -AsBatch -CustomBatchId 'custom-2' PS C:\> Start-Batch -InputObject $BatchInputs</dev:code> <dev:remarks> <maml:para>Creates and executes a batch from input items. You can create a batch input item by using the Request-ChatCompletion cmdlet with `-AsBatch` switch.</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/Start-Batch.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/batch/create</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/batch/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>Start-RealtimeSessionAudioInput</command:name> <command:verb>Start</command:verb> <command:noun>RealtimeSessionAudioInput</command:noun> <maml:description> <maml:para>Caprure and send voice from the microphone device.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This command captures audio from the computer's microphone and start sending it to the server session. To stop this, the Stop-RealtimeSessionAudioInput command must be executed.</maml:para> <maml:para>This command only works with Windows and PowerShell 7.4 or higher systems. It will not work on Linux systems or older PowerShell versions.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Start-RealtimeSessionAudioInput</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes /> <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:\> Start-RealtimeSessionAudioInput</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/Start-RealtimeSessionAudioInput.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>Start-RealtimeSessionAudioOutput</command:name> <command:verb>Start</command:verb> <command:noun>RealtimeSessionAudioOutput</command:noun> <maml:description> <maml:para>Output voice responses from the server through the computer's speaker device.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This command activates the ability to wait for a voice response from the server and output from the client computer's speaker device. To stop this, the Stop-RealtimeSessionAudioOutput command must be executed.</maml:para> <maml:para>This command only works with Windows and PowerShell 7.4 or higher systems. It will not work on Linux systems or older PowerShell versions.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Start-RealtimeSessionAudioOutput</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes /> <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:\> Start-RealtimeSessionAudioOutput</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/Start-RealtimeSessionAudioOutput.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>Start-ThreadRun</command:name> <command:verb>Start</command:verb> <command:noun>ThreadRun</command:noun> <maml:description> <maml:para>Starts a run.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Starts a run.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Start-ThreadRun</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the thread to run.</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="True (ByPropertyName)" position="1" aliases="assistant_id, AssistantId"> <maml:name>Assistant</maml:name> <maml:description> <maml:para>The ID of the assistant to use to execute this run.</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>Model</maml:name> <maml:description> <maml:para>The name of the Model to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.</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>Instructions</maml:name> <maml:description> <maml:para>Overrides the instructions of the assistant. This is useful for modifying the behavior on a per-run basis.</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="additional_instructions"> <maml:name>AdditionalInstructions</maml:name> <maml:description> <maml:para>Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.</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="additional_messages"> <maml:name>AdditionalMessages</maml:name> <maml:description> <maml:para>Adds additional messages to the thread before creating the run.</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>Include</maml:name> <maml:description> <maml:para>A list of additional fields to include in the response.</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>FileIdsForCodeInterpreter</maml:name> <maml:description> <maml:para>A list of file IDs made available to the code_interpreter tool. There can be a maximum of 20 files associated with the tool.</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>VectorStoresForFileSearch</maml:name> <maml:description> <maml:para>The vector store attached to this thread. There can be a maximum of 1 vector store attached to the thread.</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>FileIdsForFileSearch</maml:name> <maml:description> <maml:para>A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.</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>MetaData</maml:name> <maml:description> <maml:para>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.</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>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="none"> <maml:name>Functions</maml:name> <maml:description> <maml:para>A list of functions the model may call. Use this to provide a list of functions the model may generate JSON inputs for. </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="parallel_tool_calls"> <maml:name>ParallelToolCalls</maml:name> <maml:description> <maml:para>Whether to enable parallel function calling during tool use. The default is true (enabled)</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>True</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>UseCodeInterpreter</maml:name> <maml:description> <maml:para>Override whether the code interpreter tool enable or not.</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>UseFileSearch</maml:name> <maml:description> <maml:para>Override whether the file_search tool enable or not.</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>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="response_format"> <maml:name>Format</maml:name> <maml:description> <maml:para>Specifies the format that the model must output. - `default` will only outputs text message.</maml:para> <maml:para>- `json_object` enables JSON mode, which ensures the message the model generates is valid JSON. - `json_schema` enables Structured Outputs which ensures the model will match your supplied JSON schema.</maml:para> <maml:para>- `raw_response` returns raw response content from API.</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>JsonSchema</maml:name> <maml:description> <maml:para>Specifies an object or data structure to represent the JSON Schema that the model should be constrained to follow. Required if `json_schema` is specified for `-Format`. Otherwise, it is ignored.</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 : 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.</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 an API endpoint URL such like: https://your-api-endpoint.test/v1 If not specified, it will use https://api.openai.com/v1</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Uri</command:parameterValue> <dev:type> <maml:name>Uri</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>https://api.openai.com/v1</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:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="file_ids"> <maml:name>FileId</maml:name> <maml:description> <maml:para>A list of File IDs that the message should use. There can be a maximum of 10 files attached to a message. Useful for tools like file_search and code_interpreter that can access and use files.</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_prompt_tokens"> <maml:name>MaxPromptTokens</maml:name> <maml:description> <maml:para>The maximum number of prompt tokens that may be used over the course of the run.</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="max_completion_tokens"> <maml:name>MaxCompletionTokens</maml:name> <maml:description> <maml:para>The maximum number of completion tokens that may be used over the course of the run.</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="named" aliases="Content, Text"> <maml:name>Message</maml:name> <maml:description> <maml:para>The content of the message.</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>Images</maml:name> <maml:description> <maml:para>An array of images for reference to vision-compatible models. You can specify uploaded file id or URL of image.</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>ImageDetail</maml:name> <maml:description> <maml:para>Specifies the detail level of the image if specified by the user. "low" uses fewer tokens, you can opt in to high resolution using "high".</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>auto</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Role</maml:name> <maml:description> <maml:para>The role of the entity that is creating the message. Allowed value is `user` or `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="tool_choice"> <maml:name>ToolChoice</maml:name> <maml:description> <maml:para>Controls which (if any) tool is called by the model. You can choose from `auto`, `none`, `code_interpreter`, `retrieve` or `function`.</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>ToolChoiceFunctionName</maml:name> <maml:description> <maml:para>The name of the function to call. You must specify this param when the ToolChoice is specified to `function`.</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="last_messages"> <maml:name>TruncationStrategyType</maml:name> <maml:description> <maml:para>The truncation strategy to use for the thread. The default is `auto`. You can choose from `auto` or `last_messages`</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>auto</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="last_messages"> <maml:name>TruncationStrategyLastMessages</maml:name> <maml:description> <maml:para>The number of most recent messages from the thread when constructing the context for the run.</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="none"> <maml:name>AdditionalQuery</maml:name> <maml:description> <maml:para>If you want to explicitly send an extra query params, you can do so.</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>AdditionalHeaders</maml:name> <maml:description> <maml:para>If you want to explicitly send an extra headers, you can do so.</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>AdditionalBody</maml:name> <maml:description> <maml:para>If you want to explicitly send an extra body, you can do so.</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="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the thread to run.</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="True (ByPropertyName)" position="1" aliases="assistant_id, AssistantId"> <maml:name>Assistant</maml:name> <maml:description> <maml:para>The ID of the assistant to use to execute this run.</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>Model</maml:name> <maml:description> <maml:para>The name of the Model to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.</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>Instructions</maml:name> <maml:description> <maml:para>Overrides the instructions of the assistant. This is useful for modifying the behavior on a per-run basis.</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="additional_instructions"> <maml:name>AdditionalInstructions</maml:name> <maml:description> <maml:para>Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.</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="additional_messages"> <maml:name>AdditionalMessages</maml:name> <maml:description> <maml:para>Adds additional messages to the thread before creating the run.</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>Include</maml:name> <maml:description> <maml:para>A list of additional fields to include in the response.</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>FileIdsForCodeInterpreter</maml:name> <maml:description> <maml:para>A list of file IDs made available to the code_interpreter tool. There can be a maximum of 20 files associated with the tool.</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>VectorStoresForFileSearch</maml:name> <maml:description> <maml:para>The vector store attached to this thread. There can be a maximum of 1 vector store attached to the thread.</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>FileIdsForFileSearch</maml:name> <maml:description> <maml:para>A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.</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>MetaData</maml:name> <maml:description> <maml:para>Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format.</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>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="none"> <maml:name>Functions</maml:name> <maml:description> <maml:para>A list of functions the model may call. Use this to provide a list of functions the model may generate JSON inputs for. </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="parallel_tool_calls"> <maml:name>ParallelToolCalls</maml:name> <maml:description> <maml:para>Whether to enable parallel function calling during tool use. The default is true (enabled)</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>True</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>UseCodeInterpreter</maml:name> <maml:description> <maml:para>Override whether the code interpreter tool enable or not.</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>UseFileSearch</maml:name> <maml:description> <maml:para>Override whether the file_search tool enable or not.</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>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="response_format"> <maml:name>Format</maml:name> <maml:description> <maml:para>Specifies the format that the model must output. - `default` will only outputs text message.</maml:para> <maml:para>- `json_object` enables JSON mode, which ensures the message the model generates is valid JSON. - `json_schema` enables Structured Outputs which ensures the model will match your supplied JSON schema.</maml:para> <maml:para>- `raw_response` returns raw response content from API.</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>JsonSchema</maml:name> <maml:description> <maml:para>Specifies an object or data structure to represent the JSON Schema that the model should be constrained to follow. Required if `json_schema` is specified for `-Format`. Otherwise, it is ignored.</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 : 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.</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 an API endpoint URL such like: https://your-api-endpoint.test/v1 If not specified, it will use https://api.openai.com/v1</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Uri</command:parameterValue> <dev:type> <maml:name>Uri</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>https://api.openai.com/v1</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:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="file_ids"> <maml:name>FileId</maml:name> <maml:description> <maml:para>A list of File IDs that the message should use. There can be a maximum of 10 files attached to a message. Useful for tools like file_search and code_interpreter that can access and use files.</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_prompt_tokens"> <maml:name>MaxPromptTokens</maml:name> <maml:description> <maml:para>The maximum number of prompt tokens that may be used over the course of the run.</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="max_completion_tokens"> <maml:name>MaxCompletionTokens</maml:name> <maml:description> <maml:para>The maximum number of completion tokens that may be used over the course of the run.</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="named" aliases="Content, Text"> <maml:name>Message</maml:name> <maml:description> <maml:para>The content of the message.</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>Images</maml:name> <maml:description> <maml:para>An array of images for reference to vision-compatible models. You can specify uploaded file id or URL of image.</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>ImageDetail</maml:name> <maml:description> <maml:para>Specifies the detail level of the image if specified by the user. "low" uses fewer tokens, you can opt in to high resolution using "high".</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>auto</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Role</maml:name> <maml:description> <maml:para>The role of the entity that is creating the message. Allowed value is `user` or `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="tool_choice"> <maml:name>ToolChoice</maml:name> <maml:description> <maml:para>Controls which (if any) tool is called by the model. You can choose from `auto`, `none`, `code_interpreter`, `retrieve` or `function`.</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>ToolChoiceFunctionName</maml:name> <maml:description> <maml:para>The name of the function to call. You must specify this param when the ToolChoice is specified to `function`.</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="last_messages"> <maml:name>TruncationStrategyType</maml:name> <maml:description> <maml:para>The truncation strategy to use for the thread. The default is `auto`. You can choose from `auto` or `last_messages`</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>auto</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="last_messages"> <maml:name>TruncationStrategyLastMessages</maml:name> <maml:description> <maml:para>The number of most recent messages from the thread when constructing the context for the run.</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="none"> <maml:name>AdditionalQuery</maml:name> <maml:description> <maml:para>If you want to explicitly send an extra query params, you can do so.</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>AdditionalHeaders</maml:name> <maml:description> <maml:para>If you want to explicitly send an extra headers, you can do so.</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>AdditionalBody</maml:name> <maml:description> <maml:para>If you want to explicitly send an extra body, you can do so.</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>PS C:\> Start-ThreadRun -ThreadId 'thread_abc123' -Assistant 'asst_abc123'</dev:code> <dev:remarks> <maml:para>Starts a run of the thread with spcified assiatnt.</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/Start-ThreadRun.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/runs/createRun</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/runs/createRun</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>Start-VectorStoreFileBatch</command:name> <command:verb>Start</command:verb> <command:noun>VectorStoreFileBatch</command:noun> <maml:description> <maml:para>Create and run vector store file batch.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Create and run vector store file batch.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Start-VectorStoreFileBatch</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store for which to create a File Batch.</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="file_ids"> <maml:name>FileId</maml:name> <maml:description> <maml:para>A list of File IDs that the vector store should use.</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="chunking_strategy"> <maml:name>ChunkingStrategy</maml:name> <maml:description> <maml:para>The chunking strategy used to chunk the file(s). If not set, will use the "auto" strategy.</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_chunk_size_tokens"> <maml:name>MaxChunkSizeTokens</maml:name> <maml:description> <maml:para>The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096. Note that the parameter only acceptable when the ChunkingStrategy is "static".</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>800</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="chunk_overlap_tokens"> <maml:name>ChunkOverlapTokens</maml:name> <maml:description> <maml:para>The number of tokens that overlap between chunks. The default value is 400. The value must not exceed half of MaxChunkSizeTokens. Note that the parameter only acceptable when the ChunkingStrategy is "static".</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>400</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store for which to create a File Batch.</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="file_ids"> <maml:name>FileId</maml:name> <maml:description> <maml:para>A list of File IDs that the vector store should use.</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="chunking_strategy"> <maml:name>ChunkingStrategy</maml:name> <maml:description> <maml:para>The chunking strategy used to chunk the file(s). If not set, will use the "auto" strategy.</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_chunk_size_tokens"> <maml:name>MaxChunkSizeTokens</maml:name> <maml:description> <maml:para>The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096. Note that the parameter only acceptable when the ChunkingStrategy is "static".</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>800</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="chunk_overlap_tokens"> <maml:name>ChunkOverlapTokens</maml:name> <maml:description> <maml:para>The number of tokens that overlap between chunks. The default value is 400. The value must not exceed half of MaxChunkSizeTokens. Note that the parameter only acceptable when the ChunkingStrategy is "static".</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>400</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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> Start-VectorStoreFileBatch -VectorStoreId 'vs_abc123' -FileId ('file-abc123', 'file-def456', 'file-ghi789')</dev:code> <dev:remarks> <maml:para>Start a batch for adding 3 files to the vector store with ID `vs_abc123`</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/Start-VectorStoreFileBatch.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/vector-stores-file-batches/createBatch</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>Stop-Batch</command:name> <command:verb>Stop</command:verb> <command:noun>Batch</command:noun> <maml:description> <maml:para>Cancels an in-progress batch.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Cancels an in-progress batch.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Stop-Batch</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="Id, batch_id"> <maml:name>BatchId</maml:name> <maml:description> <maml:para>The batch id to cancel.</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>Wait</maml:name> <maml:description> <maml:para>By default, This cmdlet does not wait completes cancellation. When the switch specified, Waits for complete.</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>By default, This cmdlet only requests cancel a batch that the status is 'validating', 'in_progress' or 'finalizing'. When the switch specified, Always requests cancel any status of the batch.</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>PassThru</maml:name> <maml:description> <maml:para>By default, This cmdlet returns nothing. When the PassThru switch specified, This cmdlet returns Batch object.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="Id, batch_id"> <maml:name>BatchId</maml:name> <maml:description> <maml:para>The batch id to cancel.</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>Wait</maml:name> <maml:description> <maml:para>By default, This cmdlet does not wait completes cancellation. When the switch specified, Waits for complete.</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>By default, This cmdlet only requests cancel a batch that the status is 'validating', 'in_progress' or 'finalizing'. When the switch specified, Always requests cancel any status of the batch.</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>PassThru</maml:name> <maml:description> <maml:para>By default, This cmdlet returns nothing. When the PassThru switch specified, This cmdlet returns Batch object.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> $Batch = Start-Batch -FileId 'file_abc123' PS C:\> $Batch = $Batch | Stop-Batch -Force -PassThru PS C:\> $Batch.status # cancelling</dev:code> <dev:remarks> <maml:para>Cancels an in-progress batch.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> $Batch = Start-Batch -FileId 'file_abc123' PS C:\> $Batch = $Batch | Stop-Batch -Force -Wait -PassThru PS C:\> $Batch.status # cancelled</dev:code> <dev:remarks> <maml:para>Cancels an in-progress batch. Then the cmdlet waits until the batch has been cancelled.</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/Stop-Batch.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/batch/cancel</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/batch/cancel</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>Stop-RealtimeSessionAudioInput</command:name> <command:verb>Stop</command:verb> <command:noun>RealtimeSessionAudioInput</command:noun> <maml:description> <maml:para>Stop audio capture from the microphone.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Stop audio capture from the microphone.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Stop-RealtimeSessionAudioInput</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes /> <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:\> Stop-RealtimeSessionAudioInput</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/Stop-RealtimeSessionAudioInput.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>Stop-RealtimeSessionAudioOutput</command:name> <command:verb>Stop</command:verb> <command:noun>RealtimeSessionAudioOutput</command:noun> <maml:description> <maml:para>Stop speaker output.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Stop speaker output.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Stop-RealtimeSessionAudioOutput</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes /> <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:\> Stop-RealtimeSessionAudioOutput</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/Stop-RealtimeSessionAudioOutput.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>Stop-RealtimeSessionResponse</command:name> <command:verb>Stop</command:verb> <command:noun>RealtimeSessionResponse</command:noun> <maml:description> <maml:para>Send the event to cancel an in-progress response.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Send the event to cancel an in-progress response.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Stop-RealtimeSessionResponse</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>EventId</maml:name> <maml:description> <maml:para>Optional client-generated ID used to identify this event.</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="false" position="named" aliases="none"> <maml:name>EventId</maml:name> <maml:description> <maml:para>Optional client-generated ID used to identify this event.</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 /> <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:\> Stop-RealtimeSessionResponse</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/Stop-RealtimeSessionResponse.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/realtime-client-events/response/cancel</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/realtime-client-events/response/cancel</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>Stop-ThreadRun</command:name> <command:verb>Stop</command:verb> <command:noun>ThreadRun</command:noun> <maml:description> <maml:para>Cancels a run that is in_progress.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Cancels a run that is in_progress.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Stop-ThreadRun</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="run_id"> <maml:name>RunId</maml:name> <maml:description> <maml:para>The ID of the run to cancel.</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="True (ByPropertyName)" position="1" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the thread to which this run belongs.</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>Wait</maml:name> <maml:description> <maml:para>By default, This cmdlet does not wait completes cancellation. When the switch specified, Waits for complete.</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>By default, This cmdlet only requests cancel a run that the status is `queued`, `in_progress` or `requires_action`. When the switch specified, Always requests cancel any status of the run.</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>PassThru</maml:name> <maml:description> <maml:para>By default, This cmdlet returns nothing. When the PassThru switch specified, This cmdlet returns Run object.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="run_id"> <maml:name>RunId</maml:name> <maml:description> <maml:para>The ID of the run to cancel.</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="True (ByPropertyName)" position="1" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the thread to which this run belongs.</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>Wait</maml:name> <maml:description> <maml:para>By default, This cmdlet does not wait completes cancellation. When the switch specified, Waits for complete.</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>By default, This cmdlet only requests cancel a run that the status is `queued`, `in_progress` or `requires_action`. When the switch specified, Always requests cancel any status of the 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:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>PassThru</maml:name> <maml:description> <maml:para>By default, This cmdlet returns nothing. When the PassThru switch specified, This cmdlet returns Run object.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 /> <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:\> Stop-ThreadRun -RunId 'run_abc123' -ThreadId 'thread_abc123'</dev:code> <dev:remarks> <maml:para>Cancels a run.</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/Stop-ThreadRun.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/runs/cancelRun</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/runs/cancelRun</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>Stop-VectorStoreFileBatch</command:name> <command:verb>Stop</command:verb> <command:noun>VectorStoreFileBatch</command:noun> <maml:description> <maml:para>Cancel a vector store file batch.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Cancel a vector store file batch.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Stop-VectorStoreFileBatch</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store that the file batch belongs to.</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="True (ByPropertyName)" position="1" aliases="batch_id"> <maml:name>BatchId</maml:name> <maml:description> <maml:para>The ID of the file batch to cancel.</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>Wait</maml:name> <maml:description> <maml:para>By default, This cmdlet does not wait completes cancellation. When the switch specified, Waits for complete.</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>PassThru</maml:name> <maml:description> <maml:para>By default, This cmdlet returns nothing. When the PassThru switch specified, This cmdlet returns batch object.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store that the file batch belongs to.</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="True (ByPropertyName)" position="1" aliases="batch_id"> <maml:name>BatchId</maml:name> <maml:description> <maml:para>The ID of the file batch to cancel.</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>Wait</maml:name> <maml:description> <maml:para>By default, This cmdlet does not wait completes cancellation. When the switch specified, Waits for complete.</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>PassThru</maml:name> <maml:description> <maml:para>By default, This cmdlet returns nothing. When the PassThru switch specified, This cmdlet returns batch object.</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>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 : 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. </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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> Stop-VectorStoreFileBatch -VectorStoreId 'vs_abc123' -BatchId 'vsfb_abc123' -Wait</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/Stop-VectorStoreFileBatch.md</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>https://platform.openai.com/docs/api-reference/vector-stores-file-batches/cancelBatch</maml:linkText> <maml:uri>https://platform.openai.com/docs/api-reference/vector-stores-file-batches/cancelBatch</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>Wait-Batch</command:name> <command:verb>Wait</command:verb> <command:noun>Batch</command:noun> <maml:description> <maml:para>Waits until the batch is completed.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Waits until the batch is completed.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Wait-Batch</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="Id, batch_id"> <maml:name>BatchId</maml:name> <maml:description> <maml:para>The batch id to cancel.</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>StatusForExit</maml:name> <maml:description> <maml:para>By default, this cmdlet exits when the status of batch is anything other than 'validating', 'in_progress' or 'finalizing'. If specifies one or more statuses for `-StatusForExit`, this cmdlet waits until batch reaches that status. </maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">validating</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">failed</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">in_progress</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">finalizing</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">completed</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">expired</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">cancelling</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">cancelled</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>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>StatusForWait</maml:name> <maml:description> <maml:para>If one or more statuses are specified in `-StatusForWait`, this cmdlet will exit when a batch changes to a status other than that. Note: Do not specify `completed` for this parameter. cmdlet may not exit permanently. </maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">validating</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">failed</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">in_progress</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">finalizing</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">completed</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">expired</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">cancelling</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">cancelled</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>validating, in_progress, finalizing</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 : 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. </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>PollIntervalSec</maml:name> <maml:description> <maml:para>Specifies the interval in seconds to poll the batch status. The default value is `1`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Float</command:parameterValue> <dev:type> <maml:name>Float</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>1.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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="Id, batch_id"> <maml:name>BatchId</maml:name> <maml:description> <maml:para>The batch id to cancel.</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>StatusForExit</maml:name> <maml:description> <maml:para>By default, this cmdlet exits when the status of batch is anything other than 'validating', 'in_progress' or 'finalizing'. If specifies one or more statuses for `-StatusForExit`, this cmdlet waits until batch reaches that status. </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>StatusForWait</maml:name> <maml:description> <maml:para>If one or more statuses are specified in `-StatusForWait`, this cmdlet will exit when a batch changes to a status other than that. Note: Do not specify `completed` for this parameter. cmdlet may not exit permanently. </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>validating, in_progress, finalizing</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 : 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. </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>PollIntervalSec</maml:name> <maml:description> <maml:para>Specifies the interval in seconds to poll the batch status. The default value is `1`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Float</command:parameterValue> <dev:type> <maml:name>Float</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>1.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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> $BatchInputs | Start-Batch | Wait-Batch</dev:code> <dev:remarks> <maml:para>Start a batch and wait for completes.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> $Batch | Stop-Batch | Wait-Batch -StatusForExit 'cancelled'</dev:code> <dev:remarks> <maml:para>Requests a batch cancellation and wait for cancelled.</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/Wait-Batch.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>Wait-ThreadRun</command:name> <command:verb>Wait</command:verb> <command:noun>ThreadRun</command:noun> <maml:description> <maml:para>Waits until the run is completed.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Waits until the run is completed.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Wait-ThreadRun</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="run_id"> <maml:name>RunId</maml:name> <maml:description> <maml:para>The ID of thre run to wait.</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="True (ByPropertyName)" position="0" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the thread to which this run belongs.</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>StatusForExit</maml:name> <maml:description> <maml:para>By default, this cmdlet exits when the status of Run is anything other than `queued` or `in_progress`. If specifies one or more statuses for `-StatusForExit`, this cmdlet waits until Run reaches that status. </maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">queued</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">in_progress</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">completed</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">requires_action</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">expired</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">cancelling</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">cancelled</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">failed</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">incomplete</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>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>StatusForWait</maml:name> <maml:description> <maml:para>If one or more statuses are specified in `-StatusForWait`, this cmdlet will exit when Run changes to a status other than that. Note: Do not specify `completed` for this parameter. cmdlet may not exit permanently. </maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">queued</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">in_progress</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">completed</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">requires_action</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">expired</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">cancelling</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">cancelled</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">failed</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">incomplete</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>queued, in_progress</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 : 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. </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>PollIntervalSec</maml:name> <maml:description> <maml:para>Specifies the interval in seconds to poll the status of the run. The default value is `1`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Float</command:parameterValue> <dev:type> <maml:name>Float</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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="run_id"> <maml:name>RunId</maml:name> <maml:description> <maml:para>The ID of thre run to wait.</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="True (ByPropertyName)" position="0" aliases="thread_id"> <maml:name>ThreadId</maml:name> <maml:description> <maml:para>The ID of the thread to which this run belongs.</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>StatusForExit</maml:name> <maml:description> <maml:para>By default, this cmdlet exits when the status of Run is anything other than `queued` or `in_progress`. If specifies one or more statuses for `-StatusForExit`, this cmdlet waits until Run reaches that status. </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>StatusForWait</maml:name> <maml:description> <maml:para>If one or more statuses are specified in `-StatusForWait`, this cmdlet will exit when Run changes to a status other than that. Note: Do not specify `completed` for this parameter. cmdlet may not exit permanently. </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>queued, in_progress</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 : 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. </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>PollIntervalSec</maml:name> <maml:description> <maml:para>Specifies the interval in seconds to poll the status of the run. The default value is `1`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Float</command:parameterValue> <dev:type> <maml:name>Float</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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> $Thread | Start-ThreadRun | Wait-ThreadRun</dev:code> <dev:remarks> <maml:para>Start a run and wait for completes.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> $Run | Stop-ThreadRun | Wait-ThreadRun -StatusForExit 'cancelled'</dev:code> <dev:remarks> <maml:para>Requests a run cancellation and wait for cancelled.</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/Wait-ThreadRun.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>Wait-VectorStoreFileBatch</command:name> <command:verb>Wait</command:verb> <command:noun>VectorStoreFileBatch</command:noun> <maml:description> <maml:para>Waits until the vector store file batch is completed.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Waits until the vector store file batch is completed.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Wait-VectorStoreFileBatch</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store that the file batch belongs to.</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="True (ByPropertyName)" position="1" aliases="batch_id"> <maml:name>BatchId</maml:name> <maml:description> <maml:para>The ID of the batch to wait.</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>StatusForExit</maml:name> <maml:description> <maml:para>By default, this cmdlet exits when the status of batch is anything other than `in_progress`. If specifies one or more statuses for `-StatusForExit`, this cmdlet waits until batch reaches that status. </maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">failed</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">in_progress</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">completed</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">cancelling</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">cancelled</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>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 : 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. </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>PollIntervalSec</maml:name> <maml:description> <maml:para>Specifies the interval in seconds to poll the batch status. The default value is `1`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Float</command:parameterValue> <dev:type> <maml:name>Float</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>1.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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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:syntaxItem> <maml:name>Wait-VectorStoreFileBatch</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store that the file batch belongs to.</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="True (ByPropertyName)" position="1" aliases="batch_id"> <maml:name>BatchId</maml:name> <maml:description> <maml:para>The ID of the batch to wait.</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>StatusForWait</maml:name> <maml:description> <maml:para>If one or more statuses are specified in `-StatusForWait`, this cmdlet will exit when a batch changes to a status other than that. Note: Do not specify `completed` for this parameter. cmdlet may not exit permanently. </maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">failed</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">in_progress</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">completed</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">cancelling</command:parameterValue> <command:parameterValue required="false" command:variableLength="false">cancelled</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>in_progress</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 : 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. </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>PollIntervalSec</maml:name> <maml:description> <maml:para>Specifies the interval in seconds to poll the batch status. The default value is `1`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Float</command:parameterValue> <dev:type> <maml:name>Float</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>1.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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="0" aliases="vector_store_id"> <maml:name>VectorStoreId</maml:name> <maml:description> <maml:para>The ID of the vector store that the file batch belongs to.</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="True (ByPropertyName)" position="1" aliases="batch_id"> <maml:name>BatchId</maml:name> <maml:description> <maml:para>The ID of the batch to wait.</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>StatusForExit</maml:name> <maml:description> <maml:para>By default, this cmdlet exits when the status of batch is anything other than `in_progress`. If specifies one or more statuses for `-StatusForExit`, this cmdlet waits until batch reaches that status. </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>StatusForWait</maml:name> <maml:description> <maml:para>If one or more statuses are specified in `-StatusForWait`, this cmdlet will exit when a batch changes to a status other than that. Note: Do not specify `completed` for this parameter. cmdlet may not exit permanently. </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>in_progress</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 : 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. </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>PollIntervalSec</maml:name> <maml:description> <maml:para>Specifies the interval in seconds to poll the batch status. The default value is `1`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Float</command:parameterValue> <dev:type> <maml:name>Float</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>1.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 an API endpoint URL such like: `https://your-api-endpoint.test/v1` If not specified, it will use `https://api.openai.com/v1`</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>https://api.openai.com/v1</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 --------------------------</maml:title> <dev:code>PS C:\> Start-VectorStoreFileBatch -VectorStoreId 'vs_abc123' -FileId ('file-abc123', 'file-def456', 'file-ghi789') | Wait-VectorStoreFileBatch</dev:code> <dev:remarks> <maml:para>Start a batch and wait for completes.</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/Wait-VectorStoreFileBatch.md</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> </helpItems> |