# ToolChoice

Represents the tool selection strategy for a request.

Class 

`IntelligenceX.OpenAI.ToolCalling`

**Namespace**

`IntelligenceX.OpenAI.ToolCalling`

**Assembly**

`IntelligenceX`

**Source**

[ToolChoice.cs:37](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/ToolCalling/ToolChoice.cs#L37)

**Modifiers**

sealed

Represents the tool selection strategy for a request.

## Inheritance

- object
- ToolChoice

## Usage

Explore 5 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 5

- Property [ChatOptions.ToolChoice](/api/intelligencex-openai-chat-chatoptions/#property-toolchoice)
- Property [EasyChatOptions.ToolChoice](/api/intelligencex-openai-easychatoptions/#property-toolchoice)
- Method [ToolChoice.Custom](/api/intelligencex-openai-toolcalling-toolchoice/#method-custom-string)
- Property [ToolChoice.Auto](/api/intelligencex-openai-toolcalling-toolchoice/#property-auto)
- Property [ToolChoice.None](/api/intelligencex-openai-toolcalling-toolchoice/#property-none)

Filter members 

Show inherited

## Methods

`public static ToolChoice Custom(string name)` [#](#method-custom-string)

[ToolChoice.cs:37](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/ToolCalling/ToolChoice.cs#L37)

Forces the model to call a specific tool.

Parameters

**name string required**

Tool name.

Returns

`ToolChoice`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public string Type { get; }` [#](#property-type)

[ToolChoice.cs:17](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/ToolCalling/ToolChoice.cs#L17)

Gets the tool choice type.

`public string? Name { get; }` [#](#property-name)

[ToolChoice.cs:21](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/ToolCalling/ToolChoice.cs#L21)

Gets the tool name when a specific tool is required.

`public static ToolChoice Auto { get; }` [#](#property-auto)

[ToolChoice.cs:26](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/ToolCalling/ToolChoice.cs#L26)

Allows the model to decide which tool to call.

`public static ToolChoice None { get; }` [#](#property-none)

[ToolChoice.cs:30](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/ToolCalling/ToolChoice.cs#L30)

Disables tool calling.

<!-- PowerForge markdown artifact sha256:2B4761FC841337D0CA9D944DDDD6AA04ED239804B7448AA9FBA5C401EFBA379A -->
