# New-IntelligenceXThreadFork

Creates a new thread fork from an existing thread's history.

Command 

**Module**

`IntelligenceX.PowerShell`

**Inputs**

`IntelligenceX.OpenAI.IntelligenceXClient`

**Outputs**

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

Creates a new thread fork from an existing thread's history.

## Syntax

```
New-IntelligenceXThreadFork
-ThreadId <string>
[-Client <IntelligenceXClient>]
[-Raw]
[<CommonParameters>]
```

[#](#method-new-intelligencexthreadfork-string-intelligencexclient-switchparameter)

## Examples

### Example 1

```powershell
New-IntelligenceXThreadFork -ThreadId $thread.Id
```

Fork a thread

### Example 2

```powershell
$fork = New-IntelligenceXThreadFork -ThreadId $thread.Id; Send-IntelligenceXMessage -ThreadId $fork.Id -Text "Take a different approach."
```

Fork and continue conversation in the new thread

### Example 3

```powershell
New-IntelligenceXThreadFork -ThreadId $thread.Id -Raw
```

Return raw JSON response

## Parameters

**-ThreadId string required**

Identifier of the source thread to fork.

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

<!-- PowerForge markdown artifact sha256:27A6AB7EFC9DDF3929BA7501660FD4DBDE31235EEBA5CC4869E5D60B0E807FA4 -->
