-
Notifications
You must be signed in to change notification settings - Fork 29
New OAIMessage
Creates a new message in a specified thread.
New-OAIMessage [[-ThreadId] <Object>] [-Role] <Object> [-Content] <Object> [[-FileIds] <Object>]
[[-Metadata] <Object>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
The New-OAIMessage function is used to create a new message in a specified thread. It requires the thread ID, role, content, and optional file IDs as parameters.
New-OAIMessage -ThreadId 12345 -Role 'user' -Content 'Hello, world!' -FileIds 'file1', 'file2'
This example creates a new message in the thread with ID 12345, sent by a user with the content "Hello, world!" and attaches two files with IDs 'file1' and 'file2'.
The ID of the thread where the message will be created.
Type: Object
Parameter Sets: (All)
Aliases: Id
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: FalseThe role of the message sender. Only 'user' is currently supported.
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe content of the message.
Type: Object
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseAn optional array of file IDs to attach to the message.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseOptional metadata to include with the message.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
https://platform.openai.com/docs/api-reference/messages/createMessage