# `Jido.Chat.UserInfo`
[🔗](https://github.com/agentjido/jido_chat/blob/v1.2.0/lib/jido/chat/user_info.ex#L1)

Normalized provider user information.

The `id` is the user identifier from one adapter. It is not a
cross-platform identity. Adapters and runtimes can cache this data, but
`jido_chat` does not provide a global user cache.

# `t`

```elixir
@type t() :: %Jido.Chat.UserInfo{
  avatar_url: nil | nil | binary(),
  display_name: nil | nil | binary(),
  email: nil | nil | binary(),
  id: binary(),
  is_bot: boolean(),
  metadata: map(),
  username: nil | nil | binary()
}
```

# `from_map`

```elixir
@spec from_map(map()) :: t()
```

Builds user information from serialized map data.

# `new`

```elixir
@spec new(map()) :: t()
```

Creates normalized user information from atom-keyed or string-keyed input.

# `schema`

```elixir
@spec schema() :: Zoi.schema()
```

Returns the Zoi schema for UserInfo.

# `to_map`

```elixir
@spec to_map(t()) :: map()
```

Serializes user information into a plain map with a type marker.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
