Ask a question to get started
Enter to send•Shift+Enter new line
GoogleGenerativeAI( self, **kwargs: Any = {}, )
_BaseGoogleGenerativeAI
BaseLLM
Validates params and passes them to google-generativeai package.
Get the number of tokens present in the text.
Useful for checking if an input will fit in a model's context window.
Google GenerativeAI text completion large language models (legacy LLMs).
from langchain_google_genai import GoogleGenerativeAI llm = GoogleGenerativeAI(model="gemini-2.5-pro")