IntelligenceX
Cmdlet

Restore-IntelligenceXThread

Namespace IntelligenceX.PowerShell
Inputs
IntelligenceX.OpenAI.IntelligenceXClient
Outputs
IntelligenceX.Json.JsonValue IntelligenceX.OpenAI.AppServer.Models.ThreadInfo

Rolls back the last N turns from a thread.

Examples

Example 1


Restore-IntelligenceXThread -ThreadId $thread.Id -Turns 2
        

Rollback the last two turns

Example 2


Restore-IntelligenceXThread -ThreadId $thread.Id -Turns 1; Send-IntelligenceXMessage -ThreadId $thread.Id -Text "Use a shorter summary."
        

Rollback one turn and resend an adjusted message

Example 3


Restore-IntelligenceXThread -ThreadId $thread.Id -Turns 1 -Raw
        

Return raw JSON response

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Restore-IntelligenceXThread -ThreadId <string> -Turns <int> [-Client <IntelligenceXClient>] [-Raw] [<CommonParameters>]
#

Parameters

ThreadId string requiredposition: namedpipeline: false
Identifier of the thread to modify.
Turns int requiredposition: namedpipeline: false
Number of most recent turns to remove.
Client IntelligenceXClient optionalposition: namedpipeline: true (ByValue)
Client instance to use. Defaults to the active client.
Raw SwitchParameter optionalposition: namedpipeline: false
Returns the raw JSON-RPC payload instead of typed thread info.

Outputs

IntelligenceX.Json.JsonValue, IntelligenceX.OpenAI.AppServer.Models.ThreadInfo