# GoogleGenerativeAI

> **Class** in `langchain_google_genai`

📖 [View in docs](https://reference.langchain.com/python/langchain-google-genai/llms/GoogleGenerativeAI)

Google GenerativeAI text completion large language models (legacy LLMs).

!!! example "Basic Usage"

    ```python
    from langchain_google_genai import GoogleGenerativeAI

    llm = GoogleGenerativeAI(model="gemini-2.5-pro")
    ```

## Signature

```python
GoogleGenerativeAI(
    self,
    **kwargs: Any = {},
)
```

## Extends

- `_BaseGoogleGenerativeAI`
- `BaseLLM`

## Constructors

```python
__init__(
    self,
    **kwargs: Any = {},
) -> None
```


## Properties

- `client`
- `model_config`

## Methods

- [`validate_environment()`](https://reference.langchain.com/python/langchain-google-genai/llms/GoogleGenerativeAI/validate_environment)
- [`get_num_tokens()`](https://reference.langchain.com/python/langchain-google-genai/llms/GoogleGenerativeAI/get_num_tokens)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-google/blob/a3f016b2a6c4af535df275545f76fa7424aa39e5/libs/genai/langchain_google_genai/llms.py#L26)