| external help file | PSOpenAI-help.xml |
|---|---|
| Module Name | PSOpenAI |
| online version | https://github.com/mkht/PSOpenAI/blob/main/Docs/Get-ConversationItem.md |
| schema | 2.0.0 |
List items or get a specific item from a conversation.
Get-ConversationItem
[-ConversationId] <String>
[-Limit <Int32>]
[-All]
[-After <String>]
[-Order <String>]
[-Include <String[]>]
[-TimeoutSec <Int32>]
[-MaxRetryCount <Int32>]
[-ApiBase <Uri>]
[-ApiKey <SecureString>]
[<CommonParameters>]
Get-ConversationItem
[-ConversationId] <String>
[-ItemId] <String>
[-TimeoutSec <Int32>]
[-MaxRetryCount <Int32>]
[-ApiBase <Uri>]
[-ApiKey <SecureString>]
[<CommonParameters>]
Retrieves items from a conversation or a specific item by its ID.
Supports pagination, ordering, and additional query options.
PS C:\> Get-ConversationItem -ConversationId 'conv_abc123' -Limit 10Retrieves the list of items in the conversation with ID conv_abc123. Limits the result to 10 items.
PS C:\> Get-ConversationItem -ConversationId 'conv_abc123' -ItemId 'item_xyz789'Retrieves a specific item with ID item_xyz789 from the conversation conv_abc123.
PS C:\> Get-ConversationItem -ConversationId 'conv_abc123' -AllRetrieves all items from the conversation, handling pagination automatically.
The unique identifier of the conversation.
Type: String
Aliases: Conversation, conversation_id
Required: True
Position: 0
Accept pipeline input: True (ByPropertyName, ByValue)The unique identifier of the item to retrieve.
Type: String
Aliases: item_id
Required: True (when using 'Get' parameter set)
Position: 1
Accept pipeline input: True (ByPropertyName)The maximum number of items to retrieve per request.
Default is 20. Maximum is 100.
Type: Int32
Required: False
Position: Named
Default value: 20If specified, retrieves all items by automatically handling pagination.
Type: Switch
Required: False
Position: NamedA cursor for pagination. Retrieves items after the specified item ID.
Type: String
Required: False
Position: NamedThe order in which to return items. Allowed values: asc, desc. Default is asc.
Type: String
Required: False
Position: Named
Default value: ascSpecify additional output data to include in the model response.
Type: String[]
Required: False
Position: NamedSpecifies how long the request can be pending before it times out.
Default is 0 (infinite).
Type: Int32
Required: False
Position: Named
Default value: 0Specifies the maximum number of retries if the request fails.
Default is 0 (No retry).
Type: Int32
Required: False
Position: Named
Default value: 0Specifies the API endpoint URL.
Type: System.Uri
Required: False
Position: NamedSpecifies the API key for authentication.
Type: SecureString
Required: False
Position: Namedhttps://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/retrieve https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list