external help file | Module Name | online version | schema |
---|---|---|---|
PSOpenAI-help.xml |
PSOpenAI |
2.0.0 |
Create a new OpenAI realtime conversation session.
Connect-RealtimeSession
[-Model <String>]
[-ApiType <OpenAIApiType>]
[-ApiBase <Uri>]
[-AuthType <String>]
[-ApiKey <SecureString>]
Create a new realtime conversation session. This technically means connecting to the WebSocket endpoint provided by the OpenAI Realtime API.
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.
PS C:\> Connect-RealtimeSession -Model 'gpt-4o-realtime-preview-2024-10-01'
It is recommended that you always specify the model you want to use.
Type: String
Required: False
Position: Named
Specifies an API endpoint URL such like: https://your-api-endpoint.test/v1
If not specified, it will use https://api.openai.com/v1
Type: System.Uri
Required: False
Position: Named
Default value: https://api.openai.com/v1
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
Type: Object
Required: False
Position: Named
Specifies API type of use. OpenAI
(default) or Azure
Type: OpenAIApiType
Accepted values: OpenAI, Azure
Required: False
Position: Named
Default value: OpenAI
If you wish to use Entra-ID based authentication, specifies as azure_ad
.
Type: String
Accepted values: openai, azure, azure_ad
Required: False
Position: Named