# AmazonQ

> **Class** in `langchain_aws`

📖 [View in docs](https://reference.langchain.com/python/langchain-aws/runnables/q_business/AmazonQ)

Amazon Q Runnable wrapper.

To authenticate, the AWS client uses the following methods to
automatically load credentials:
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html

Make sure the credentials / roles used have the required policies to
access the Amazon Q service.

## Signature

```python
AmazonQ(
    self,
    region_name: Optional[str] = None,
    credentials: Optional[Any] = None,
    client: Optional[Any] = None,
    application_id: Optional[str] = None,
    parent_message_id: Optional[str] = None,
    conversation_id: Optional[str] = None,
    chat_mode: str = 'RETRIEVAL_MODE',
)
```

## Extends

- `Runnable[Union[str, ChatPromptValue, List[ChatPromptValue]], ChatPromptValue]`

## Constructors

```python
__init__(
    self,
    region_name: Optional[str] = None,
    credentials: Optional[Any] = None,
    client: Optional[Any] = None,
    application_id: Optional[str] = None,
    parent_message_id: Optional[str] = None,
    conversation_id: Optional[str] = None,
    chat_mode: str = 'RETRIEVAL_MODE',
)
```

| Name | Type |
|------|------|
| `region_name` | `Optional[str]` |
| `credentials` | `Optional[Any]` |
| `client` | `Optional[Any]` |
| `application_id` | `Optional[str]` |
| `parent_message_id` | `Optional[str]` |
| `conversation_id` | `Optional[str]` |
| `chat_mode` | `str` |


## Properties

- `region_name`
- `credentials`
- `client`
- `application_id`
- `parent_message_id`
- `conversation_id`
- `chat_mode`
- `model_config`

## Methods

- [`invoke()`](https://reference.langchain.com/python/langchain-aws/runnables/q_business/AmazonQ/invoke)
- [`validate_environment()`](https://reference.langchain.com/python/langchain-aws/runnables/q_business/AmazonQ/validate_environment)
- [`convert_langchain_messages_to_q_input()`](https://reference.langchain.com/python/langchain-aws/runnables/q_business/AmazonQ/convert_langchain_messages_to_q_input)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-aws/blob/ea22fe3d744a3248b0b74ed555e9c34844b35a54/libs/aws/langchain_aws/runnables/q_business.py#L14)