llm_google#

class baf.nlp.llm.llm_google.LLMGoogle(agent, name, parameters, num_previous_messages=1, global_context=None)[source]#

Bases: LLMOpenAICompatible

LLM wrapper for Google Gemini models via Google’s OpenAI-compatible endpoint.

Requires nlp.google.api_key to be set in the agent config file. The default base URL points to the Gemini OpenAI-compatible endpoint.

Example model names: "gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.0-flash", "gemini-1.5-pro".

Note: for advanced Gemini-specific features (grounding, multimodal tool use, etc.) a native google-genai SDK wrapper can be added separately.

API_KEY_PROPERTY = <baf.core.property.Property object>#

Property constant used to look up the API key from the agent config file.

DEFAULT_BASE_URL = 'https://generativelanguage.googleapis.com/v1beta/openai/'#

Provider base URL. None → use the OpenAI SDK default (api.openai.com).

_abc_impl = <_abc._abc_data object>#