# ChatGptOptionsBuilderExtensions.UseConfiguration method

Configures the ChatGptClient reading configuration from the specified IConfiguration source.

```csharp
public static ChatGptOptionsBuilder UseConfiguration(this ChatGptOptionsBuilder builder, 
    IConfiguration configuration, string sectionName = "ChatGPT")
```

| parameter | description |
| --- | --- |
| builder | The [`ChatGptOptionsBuilder`](../ChatGptOptionsBuilder.md) object to configure. |
| configuration | The IConfiguration being bound. |
| sectionName | The name of the configuration section that holds ChatGPT settings (default: ChatGPT). |

## Return Value

A reference to this instance after the operation has completed.

## See Also

* class [ChatGptOptionsBuilder](../ChatGptOptionsBuilder.md)
* class [ChatGptOptionsBuilderExtensions](../ChatGptOptionsBuilderExtensions.md)
* namespace [ChatGptNet](../../ChatGptNet.md)

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