***

title: updateSettings
slug: /reference/typescript/agents/function-result/update-settings
description: Update AI runtime settings dynamically during a call.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[functionresult]: /docs/server-sdks/reference/typescript/agents/function-result

Update AI runtime settings dynamically during a call. Changes take effect
for subsequent LLM turns.

## **Parameters**

<ParamField path="settings" type={"Record<string, unknown>"} required={true} toc={true}>
  Object of settings to update. Supported keys:

  | Key                 | Type    | Range                       |
  | ------------------- | ------- | --------------------------- |
  | `frequency-penalty` | `float` | -2.0 to 2.0                 |
  | `presence-penalty`  | `float` | -2.0 to 2.0                 |
  | `max-tokens`        | `int`   | 0 to 4096                   |
  | `top-p`             | `float` | 0.0 to 1.0                  |
  | `confidence`        | `float` | 0.0 to 1.0                  |
  | `barge-confidence`  | `float` | 0.0 to 1.0                  |
  | `temperature`       | `float` | 0.0 to 2.0 (clamped to 1.5) |
</ParamField>

## **Returns**

[`FunctionResult`][functionresult] -- `this`, for chaining.

## **Example**

```typescript {4}
import { FunctionResult } from '@signalwire/sdk';

const result = new FunctionResult()
  .updateSettings({ temperature: 0.3, 'top-p': 0.9 });
```