# IChatGptClientFactory.CreateClient method (1 of 3)

Creates a new instance of a ChatGptClient.

```csharp
public IChatGptClient CreateClient()
```

## Return Value

A new [`IChatGptClient`](../IChatGptClient.md)

## See Also

* interface [IChatGptClient](../IChatGptClient.md)
* interface [IChatGptClientFactory](../IChatGptClientFactory.md)
* namespace [ChatGptNet](../../ChatGptNet.md)

---

# IChatGptClientFactory.CreateClient method (2 of 3)

Creates a new instance of a ChatGptClient configured with the supplied action.

```csharp
public IChatGptClient CreateClient(Action<ChatGptOptionsBuilder>? setupAction)
```

| parameter | description |
| --- | --- |
| setupAction | The Action to configure the provided [`ChatGptOptions`](../ChatGptOptions.md). |

## Return Value

A new [`IChatGptClient`](../IChatGptClient.md)

## See Also

* interface [IChatGptClient](../IChatGptClient.md)
* class [ChatGptOptionsBuilder](../ChatGptOptionsBuilder.md)
* interface [IChatGptClientFactory](../IChatGptClientFactory.md)
* namespace [ChatGptNet](../../ChatGptNet.md)

---

# IChatGptClientFactory.CreateClient method (3 of 3)

Creates a new instance of a ChatGptClient configured with the supplied action.

```csharp
public IChatGptClient CreateClient(Action<IServiceProvider, ChatGptOptionsBuilder>? setupAction)
```

| parameter | description |
| --- | --- |
| setupAction | The Action to configure the provided [`ChatGptOptions`](../ChatGptOptions.md). |

## Return Value

A new [`IChatGptClient`](../IChatGptClient.md)

## See Also

* interface [IChatGptClient](../IChatGptClient.md)
* class [ChatGptOptionsBuilder](../ChatGptOptionsBuilder.md)
* interface [IChatGptClientFactory](../IChatGptClientFactory.md)
* namespace [ChatGptNet](../../ChatGptNet.md)

<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->
