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

# AskUserMessage

Ask for the user input before continuing.
If the user does not answer in time (see timeout), a TimeoutError will be raised or None will be returned depending on raise\_on\_timeout.
If a project ID is configured, the messages will be uploaded to the cloud storage.

### Attributes

<ParamField path="content" type="str">
  The content of the message.
</ParamField>

<ParamField path="author" type="str" optional default="config.ui.name">
  The author of the message, defaults to the chatbot name defined in your
  config.
</ParamField>

<ParamField path="timeout" type="int" optional default={60}>
  The number of seconds to wait for an answer before raising a TimeoutError.
</ParamField>

<ParamField path="raise_on_timeout" type="bool" optional default={false}>
  Whether to raise a socketio TimeoutError if the user does not answer in time.
</ParamField>

### Returns

<ResponseField name="response" type="StepDict | None">
  The response of the user.
</ResponseField>

### Usage

```python theme={null}
import chainlit as cl


@cl.on_chat_start
async def main():
    res = await cl.AskUserMessage(content="What is your name?", timeout=10).send()
    if res:
        await cl.Message(
            content=f"Your name is: {res['output']}",
        ).send()
```
