2.0.0 (latest) 1.159.0 1.158.0 1.157.0 1.156.0 1.155.0 1.154.0

    ChatSession(
        model: vertexai.generative_models._generative_models._GenerativeModel,
        *,
        history: typing.Optional[
            typing.List[vertexai.generative_models._generative_models.Content]
        ] = None,
        response_validation: bool = True
    )

Chat session holds the chat history.

## Methods

### send_message

Generates content.

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `ResponseValidationError` | If the response was blocked or is incomplete. |

### send_message_async

Generates content asynchronously.

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `ResponseValidationError` | If the response was blocked or is incomplete. |