# InteractionInputBuilder

- Module: [Aspire.Hosting](/reference/api/typescript/aspire.hosting.md)
- Version: `13.5.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/e076d8e427cb3afb528dbd605acd74c3aea69f94)

An opaque, server-side builder for an `InteractionInput` used by polyglot AppHosts.

## Definition

```typescript
interface InteractionInputBuilder {
  withChoiceOptions(choices: InteractionChoiceOption[]): InteractionInputBuilder;
  withDynamicLoading(callback: (arg: InteractionInputLoadContext) => Promise<void>, options?: DynamicLoadingOptions): InteractionInputBuilder;
  withValue(value: string): InteractionInputBuilder;
}
```

## Methods

- [withChoiceOptions](/reference/api/typescript/aspire.hosting/interactioninputbuilder/withchoiceoptions.md) -- `method` -- Sets the choice options for the input.
    ```typescript
  withChoiceOptions(choices: InteractionChoiceOption[]): InteractionInputBuilder
  ```
- [withDynamicLoading](/reference/api/typescript/aspire.hosting/interactioninputbuilder/withdynamicloading.md) -- `method` -- Attaches a callback that dynamically loads or updates the input after the prompt starts.
    ```typescript
  withDynamicLoading(callback: (arg: InteractionInputLoadContext) => Promise<void>, options?: DynamicLoadingOptions): InteractionInputBuilder
  ```
- [withValue](/reference/api/typescript/aspire.hosting/interactioninputbuilder/withvalue.md) -- `method` -- Sets the value of the input.
    ```typescript
  withValue(value: string): InteractionInputBuilder
  ```
