> ## 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.

# ChatConfig

<span id="atoti_ai_openai.ChatConfig" />

> atoti\_ai\_openai.ChatConfig(<br />
>     \*,<br />
>     *model*: [str](https://docs.python.org/3/library/stdtypes.html#str),<br />
>     *temperature*: [float](https://docs.python.org/3/library/functions.html#float) | [None](https://docs.python.org/3/library/constants.html#None) = `None`,<br />
>     *top\_p*: [float](https://docs.python.org/3/library/functions.html#float) | [None](https://docs.python.org/3/library/constants.html#None) = `None`,<br />
>     *max\_tokens*: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None) = `None`,<br />
>     *max\_completion\_tokens*: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None) = `None`,<br />
>     *seed*: [int](https://docs.python.org/3/library/functions.html#int) | [None](https://docs.python.org/3/library/constants.html#None) = `None`,<br />
>     *tool\_choice*: [str](https://docs.python.org/3/library/stdtypes.html#str) | [None](https://docs.python.org/3/library/constants.html#None) = `None`,<br />
>     *parallel\_tool\_calls*: [bool](https://docs.python.org/3/library/functions.html#bool) | [None](https://docs.python.org/3/library/constants.html#None) = `None`,<br />
>     *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`,<br />
> )

Chat config for OpenAI.

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.ChatConfig#atoti_ai.ChatConfig) implementations.
</Callout>

### Attributes

<h4 id="atoti_ai_openai.ChatConfig.model">
  *model*
</h4>

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

<h4 id="atoti_ai_openai.ChatConfig.temperature">
  *temperature*
</h4>

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

Not supported by reasoning models (e.g. o1, o3, gpt-5).

<h4 id="atoti_ai_openai.ChatConfig.top_p">
  *top\_p*
</h4>

Nucleus sampling parameter.

Controls diversity via cumulative probability.
Not supported by reasoning models (e.g. o1, o3, gpt-5).

<h4 id="atoti_ai_openai.ChatConfig.max_tokens">
  *max\_tokens*
</h4>

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).

<h4 id="atoti_ai_openai.ChatConfig.max_completion_tokens">
  *max\_completion\_tokens*
</h4>

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

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

<h4 id="atoti_ai_openai.ChatConfig.seed">
  *seed*
</h4>

Seed for deterministic sampling (Beta).

<h4 id="atoti_ai_openai.ChatConfig.tool_choice">
  *tool\_choice*
</h4>

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

<h4 id="atoti_ai_openai.ChatConfig.parallel_tool_calls">
  *parallel\_tool\_calls*
</h4>

Enable parallel function calling during tool use.

<h4 id="atoti_ai_openai.ChatConfig.extra_body">
  *extra\_body*
</h4>

Additional parameters for OpenAI-compatible servers.
