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

# autogen.runtime_logging.log_chat_completion

<code class="doc-symbol doc-symbol-heading doc-symbol-function" />

#### log\_chat\_completion

```python theme={null}
log_chat_completion(
    invocation_id: UUID,
    client_id: int,
    wrapper_id: int,
    agent: str | Agent,
    request: dict[str, float | str | list[dict[str, str]]],
    response: "str | 'ChatCompletion'",
    is_cached: int,
    cost: float,
    start_time: str
) -> None
```

<b>Parameters:</b>

| Name            | Description                                                  |
| --------------- | ------------------------------------------------------------ |
| `invocation_id` | **Type:** uuid.UUID                                          |
| `client_id`     | **Type:** int                                                |
| `wrapper_id`    | **Type:** int                                                |
| `agent`         | **Type:** str \| Agent                                       |
| `request`       | **Type:** dict\[str, float \| str \| list\[dict\[str, str]]] |
| `response`      | **Type:** "str \| 'ChatCompletion'"                          |
| `is_cached`     | **Type:** int                                                |
| `cost`          | **Type:** float                                              |
| `start_time`    | **Type:** str                                                |

<br />
