# Patch the Anthropic client for Instructor
client = instructor.from_anthropic(
    anthropic_client, mode=instructor.Mode.ANTHROPIC_JSON
)

user_info = client.chat.completions.create(
    model="claude-3-5-sonnet-20241022",
    response_model=UserInfo,
    messages=[{"role": "user", "content": "John Doe is 30 years old."}],
    max_tokens=1000,
)

print(user_info)
```

### Gemini

```python
from opik.integrations.genai import track_genai
import instructor
from google import genai