Skip to content

Issue: AttributeError: module 'langsmith.wrappers' has no attribute 'wrap_gemini' #2818

@AnubhavDataSci25

Description

Issue you'd like to raise.

from google import genai
from google.genai import types
from langsmith import wrappers

Use Google Gen AI client same as you normally would.

client = wrappers.wrap_gemini(genai.Client(api_key="your-api-key"))

Basic text generation:

response = client.models.generate_content(
model="gemini-2.5-flash",
contents="Why is the sky blue?",
)
print(response.text)

AttributeError Traceback (most recent call last)
Cell In[8], line 6
2 from google.genai import types
3 from langsmith import wrappers
4
5 # Use Google Gen AI client same as you normally would.
----> 6 client = wrappers.wrap_gemini(genai.Client(api_key="your-api-key"))
7
8 # Basic text generation:
9 response = client.models.generate_content(

AttributeError: module 'langsmith.wrappers' has no attribute 'wrap_gemini'

Suggestion:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions