> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# atoti_ai_openai.ChatConfig

### *final class* atoti\_ai\_openai.ChatConfig

Chat config for OpenAI.

<Warning>
  This feature is [`experimental`](./atoti.experimental#atoti.experimental), its key is `"ai"`.
</Warning>

See the [corresponding Javadoc](https://docs.spring.io/spring-ai/docs/current/api/org/springframework/ai/openai/OpenAiChatOptions.html) for more details.

<Callout icon="link">
  **See also**:
  The other [`ChatConfig`](./atoti_ai.chat_config#atoti_ai.ChatConfig) implementations.
</Callout>

#### extra\_body *: [Mapping](https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping)\[[str](https://docs.python.org/3/library/stdtypes.html#str), [bool](https://docs.python.org/3/library/functions.html#bool) | [int](https://docs.python.org/3/library/functions.html#int) | [float](https://docs.python.org/3/library/functions.html#float) | [str](https://docs.python.org/3/library/stdtypes.html#str)] | [None](https://docs.python.org/3/library/constants.html#None)* *= None*

Additional parameters for OpenAI-compatible servers.

#### max\_completion\_tokens *: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None)* *= None*

Maximum number of tokens to generate for reasoning models (e.g. o1, o3).

Mutually exclusive with [`max_tokens`](#atoti_ai_openai.ChatConfig.max_tokens).

#### max\_tokens *: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None)* *= None*

Maximum number of tokens to generate in the response.

For non-reasoning models.
Mutually exclusive with [`max_completion_tokens`](#atoti_ai_openai.ChatConfig.max_completion_tokens).

#### model *: [str](https://docs.python.org/3/library/stdtypes.html#str)*

The ID of the model to use, for example `"gpt-4o"`.

#### parallel\_tool\_calls *: [bool](https://docs.python.org/3/library/functions.html#bool) | [None](https://docs.python.org/3/library/constants.html#None)* *= None*

Enable parallel function calling during tool use.

#### seed *: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None)* *= None*

Seed for deterministic sampling (Beta).

#### temperature *: [float](https://docs.python.org/3/library/functions.html#float) | [None](https://docs.python.org/3/library/constants.html#None)* *= None*

Controls randomness in responses from 0.0 (deterministic) to 2.0 (creative).

#### tool\_choice *: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None)* *= None*

Tool/function calling behavior (`"none"`, `"auto"`, or a specific function name).

#### top\_p *: [float](https://docs.python.org/3/library/functions.html#float) | [None](https://docs.python.org/3/library/constants.html#None)* *= None*

Nucleus sampling parameter.

Controls diversity via cumulative probability.
