IntelligenceX
Command

Restore-IntelligenceXThread

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

Rolls back the last N turns from a thread.

Syntax

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

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

Parameters

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

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.