# PredictionGuard

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/llms/predictionguard/PredictionGuard)

Prediction Guard large language models.

To use, you should have the ``predictionguard`` python package installed, and the
environment variable ``PREDICTIONGUARD_API_KEY`` set with your API key, or pass
it as a named parameter to the constructor.

## Signature

```python
PredictionGuard()
```

## Description

**Example:**

.. code-block:: python

llm = PredictionGuard(
    model="Hermes-3-Llama-3.1-8B",
    predictionguard_api_key="your Prediction Guard API key",
)

## Extends

- `LLM`

## Properties

- `client`
- `model`
- `max_tokens`
- `temperature`
- `top_p`
- `top_k`
- `stop`
- `predictionguard_input`
- `predictionguard_output`
- `predictionguard_api_key`
- `model_config`

## Methods

- [`validate_environment()`](https://reference.langchain.com/python/langchain-community/llms/predictionguard/PredictionGuard/validate_environment)

## ⚠️ Deprecated

Deprecated since version 0.3.28.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/d5ea8358933260ad48dd31f7f8076555c7b4885a/libs/community/langchain_community/llms/predictionguard.py#L15)