Skip to content

Get OAIMessage

dfinke edited this page Apr 20, 2024 · 2 revisions

Get-OAIMessage

SYNOPSIS

Retrieves messages from a specific thread in the OAIBeta API.

SYNTAX

Get-OAIMessage [[-ThreadId] <Object>] [[-Limit] <Object>] [[-Order] <Object>] [[-After] <Object>]
 [[-Before] <Object>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

The Get-OAIMessage function retrieves messages from a specific thread in the OAIBeta API. It allows you to specify various parameters such as thread ID, limit, order, after, and before to filter the messages.

EXAMPLES

EXAMPLE 1

Get-OAIMessage -ThreadId 12345 -Limit 10 -Order 'asc' -After $Message1.id -Before $Message5.id
Retrieves the 10 oldest messages from the thread with ID 12345, in ascending order, between messages 1 and 5.

PARAMETERS

-ThreadId

The ID of the thread from which to retrieve messages.

Type: Object
Parameter Sets: (All)
Aliases: id, thread_id

Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Limit

The maximum number of messages to retrieve. The default value is 20.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: 20
Accept pipeline input: False
Accept wildcard characters: False

-Order

The order in which the messages should be retrieved. Valid values are 'asc' (ascending) and 'desc' (descending). The default value is 'desc'.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: Desc
Accept pipeline input: False
Accept wildcard characters: False

-After

Retrieve messages after the specified date/time.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Before

Retrieve messages before the specified date/time.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

RELATED LINKS

Clone this wiki locally