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

# Configure the dialogue model

Tune the default text model or have Vivix call your OpenAI-compatible service. If your application already generates the dialogue, use [Speak provided content](/streaming-avatar/interaction/scripted-performances).

Set `pipeline_config` at the top level of your Create Session request, alongside `model`, `output`, and `avatars`. Put these settings inside its `llm_config` object, preserving your other settings. If you use a saved Character, update its configuration before creating a new session.

## 1. Tune the default model

```json theme={null}
{
  "pipeline_config": {
    "llm_config": {
      "llm_temperature": 0.4,
      "llm_max_output_tokens": 256
    }
  }
}
```

You do not need an endpoint or model name when changing only generation settings. A low token limit can truncate a reply; use character instructions to request shorter answers as well.

## 2. Connect your service

```json theme={null}
{
  "pipeline_config": {
    "llm_config": {
      "llm_backend": "openai",
      "llm_base_url": "https://YOUR_LLM_ENDPOINT/v1",
      "llm_model": "YOUR_MODEL",
      "llm_api_key": "YOUR_PROVIDER_API_KEY"
    }
  }
}
```

Replace the endpoint and model name with your service’s values. If supplied, `llm_backend` must be `openai`. Replace `llm_api_key` with the service key, or omit it if the service does not require authentication. Keep private credentials out of browser code and publicly readable character configuration; use appropriately scoped credentials or a server-side proxy.

## 3. Pass additional model settings

```json theme={null}
{
  "pipeline_config": {
    "llm_config": {
      "llm_extra_payload": "{\"top_p\":0.9}"
    }
  }
}
```

`llm_extra_payload` is a JSON-encoded string, not a nested object. Include only settings supported by your model. Merge these excerpts into the existing configuration, preserve voice and images, and start a new session after saving.

## 4. Evaluate the change

Compare new sessions using the same questions. Lower `llm_temperature` generally makes wording steadier; higher values may increase variety, depending on the model. `llm_max_output_tokens` limits generated tokens, not words, and does not guarantee a sentence ends cleanly. Request concise speech in character instructions, then allow enough output tokens.

A working integration produces `response.output_text.delta`; inspect the status in `response.done`. If an authentication or model error arrives without text, check the endpoint, credentials, and model name. If text arrives without sound, investigate TTS and media playback rather than repeatedly changing the text model.
