# Stop-IntelligenceXTurn

Interrupts a running turn for a thread.

Command 

**Module**

`IntelligenceX.PowerShell`

**Inputs**

`IntelligenceX.OpenAI.IntelligenceXClient`

Interrupts a running turn for a thread.

## Syntax

```
Stop-IntelligenceXTurn
-ThreadId <string>
-TurnId <string>
[-Client <IntelligenceXClient>]
[<CommonParameters>]
```

[#](#method-stop-intelligencexturn-string-string-intelligencexclient)

## Examples

### Example 1

```powershell
Stop-IntelligenceXTurn -ThreadId $thread.Id -TurnId $turn.Id
```

Stop a running turn

### Example 2

```powershell
$turn = Send-IntelligenceXMessage -ThreadId $thread.Id -Text "Generate a long report"; Stop-IntelligenceXTurn -ThreadId $thread.Id -TurnId $turn.Id
```

Stop the turn returned by Send-IntelligenceXMessage

### Example 3

```powershell
Stop-IntelligenceXTurn -Client $client -ThreadId $thread.Id -TurnId $turn.Id
```

Interrupt with an explicit client

## Parameters

**-ThreadId string required**

Identifier of the thread that owns the running turn.

**-TurnId string required**

Identifier of the turn to interrupt.

**-Client IntelligenceXClient optionalpipeline: true (ByValue)**

Client instance to use. Defaults to the active client.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

<!-- PowerForge markdown artifact sha256:4E98E654F7A37649BF553F23B7542F2FAD9BB702AE333842A67E4013D85F43BB -->
