# ToolRunner

Executes a chat request with tool calls resolved locally.

Class 

`IntelligenceX.OpenAI.ToolCalling`

**Namespace**

`IntelligenceX.OpenAI.ToolCalling`

**Assembly**

`IntelligenceX`

**Source**

[ToolRunner.cs:14](https://github.com/EvotecIT/IntelligenceX/blob/master/IntelligenceX/Providers/OpenAI/ToolCalling/ToolRunner.cs#L14)

**Modifiers**

static

Executes a chat request with tool calls resolved locally.

## Inheritance

- object
- ToolRunner

Filter members 

Show inherited

## Methods

`public static async Task<ToolRunResult> RunAsync(IntelligenceXClient client, ChatInput input, ChatOptions options, ToolRegistry registry, ToolRunnerOptions? runnerOptions = null, CancellationToken cancellationToken = default)` [#](#member-d442208401b72c066efacb65)

Runs a chat request and executes tool calls until completion.

Parameters

**client IntelligenceX.OpenAI.IntelligenceXClient required**

OpenAI client instance.

**input IntelligenceX.OpenAI.Chat.ChatInput required**

Chat input.

**options IntelligenceX.OpenAI.Chat.ChatOptions required**

Chat options (tools will be injected).

**registry IntelligenceX.Tools.ToolRegistry required**

Tool registry.

**runnerOptions IntelligenceX.OpenAI.ToolCalling.ToolRunnerOptions? = null optional**

Runner options.

**cancellationToken System.Threading.CancellationToken = default optional**

Cancellation token.

Returns

`Task<ToolRunResult>`

## 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?`

<!-- PowerForge markdown artifact sha256:DA5FD4903C3C127FB13D2260A2E0D7B17ABD4B3A0D120E32E462B77270CC8BF8 -->
