# InteractionInputBuilder.WithDynamicLoading

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Defined on: [InteractionInputBuilder](/reference/api/go/aspire.hosting/interactioninputbuilder.md)
- Version: `17.0.0`
- Kind: `method`

Attaches a callback that dynamically loads or updates the input after the prompt starts.

## Definition

```go
type InteractionInputBuilder interface {
    // ... omitted for brevity
    WithDynamicLoading(
        callback func(arg InteractionInputLoadContext),
        options ...*DynamicLoadingOptions,
    ) InteractionInputBuilder
}
```

## Signature

```go
WithDynamicLoading(
    callback func(arg InteractionInputLoadContext),
    options ...*DynamicLoadingOptions,
) InteractionInputBuilder
```

## Parameters

- `callback` (`func(arg InteractionInputLoadContext)`) -- The callback invoked to load the input. Use the supplied context to read other inputs and update this input.
- `options` (`...*DynamicLoadingOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed as the existing [`*DynamicLoadingOptions`](/reference/api/go/aspire.hosting/dynamicloadingoptions.md) struct.

## Returns

[`InteractionInputBuilder`](/reference/api/go/aspire.hosting/interactioninputbuilder.md) -- The same builder handle.

Returns a handle; failures surface later via `Err()`.

## Defined on

- [InteractionInputBuilder](/reference/api/go/aspire.hosting/interactioninputbuilder.md) -- `handle`
