# ModelArmorSanitizeBaseRunnable

> **Class** in `langchain_google_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-google-community/model_armor/base_runnable/ModelArmorSanitizeBaseRunnable)

Base runnable for user prompt or model response sanitization using
Model Armor.

## Signature

```python
ModelArmorSanitizeBaseRunnable(
    self,
    project: Optional[str] = None,
    location: Optional[str] = _DEFAULT_LOCATION,
    credentials: Optional[google_auth_credentials.Credentials] = None,
    transport: Optional[str] = None,
    client_options: Optional[Any] = None,
    client_info: Optional[Any] = None,
    template_id: Optional[str] = None,
    fail_open: bool = False,
    **kwargs: Any = {},
)
```

## Description

**Setup:**

You must either:
    - Have credentials configured for your environment (gcloud, workload
        identity , etc...)
    - Store the path to a service account JSON file as the
        `GOOGLE_APPLICATION_CREDENTIALS` environment variable.

For more information, see:

- https://cloud.google.com/docs/authentication/application-default-credentials#GAC
- https://googleapis.dev/python/google-auth/latest/reference/google.auth.html#module-google.auth

## Extends

- `ModelArmorParams`
- `RunnableSerializable`

## Constructors

```python
__init__(
    self,
    project: Optional[str] = None,
    location: Optional[str] = _DEFAULT_LOCATION,
    credentials: Optional[google_auth_credentials.Credentials] = None,
    transport: Optional[str] = None,
    client_options: Optional[Any] = None,
    client_info: Optional[Any] = None,
    template_id: Optional[str] = None,
    fail_open: bool = False,
    **kwargs: Any = {},
) -> None
```

| Name | Type |
|------|------|
| `project` | `Optional[str]` |
| `location` | `Optional[str]` |
| `credentials` | `Optional[google_auth_credentials.Credentials]` |
| `transport` | `Optional[str]` |
| `client_options` | `Optional[Any]` |
| `client_info` | `Optional[Any]` |
| `template_id` | `Optional[str]` |
| `fail_open` | `bool` |


## Properties

- `client`

## Methods

- [`is_lc_serializable()`](https://reference.langchain.com/python/langchain-google-community/model_armor/base_runnable/ModelArmorSanitizeBaseRunnable/is_lc_serializable)
- [`get_lc_namespace()`](https://reference.langchain.com/python/langchain-google-community/model_armor/base_runnable/ModelArmorSanitizeBaseRunnable/get_lc_namespace)
- [`evaluate()`](https://reference.langchain.com/python/langchain-google-community/model_armor/base_runnable/ModelArmorSanitizeBaseRunnable/evaluate)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-google/blob/a3f016b2a6c4af535df275545f76fa7424aa39e5/libs/community/langchain_google_community/model_armor/base_runnable.py#L106)