Skip to content
masterclass Buddy

LangSmith · Function

wrap_gemini

wrap_gemini patches a Google Gen AI client so supported Gemini calls are traced in LangSmith. It keeps the client's normal interface and supports streaming, async calls, multimodal input, tools, and token tracking.

Last updated

Since
v0.5

Syntax

wrap_gemini(client: C, *, tracing_extra: Optional[TracingExtra] = None, chat_name: str = 'ChatGoogleGenerativeAI') -> C

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • generate_content
  • generate_content_stream
  • tracing_extra
  • wrap_gemini_live

Source: wrap_gemini | langsmith | LangChain Reference. Checked 2026-11-03.