{"library":"openinference-instrumentation-instructor","title":"OpenInference Instructor Instrumentation","description":"OpenTelemetry instrumentation for the instructor library (Python), enabling tracing of LLM calls and structured extraction for observability with Phoenix and other OpenInference-compatible backends. Current version: 0.1.14. Release cadence: irregular, part of the openinference monorepo.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install openinference-instrumentation-instructor"],"cli":null},"imports":["from openinference.instrumentation.instructor import InstructorInstrumentor"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import instructor\nfrom openinference.instrumentation.instructor import InstructorInstrumentor\n\n# Instrument before using instructor\nInstructorInstrumentor().instrument()\n\n# Now use instructor normally\nclient = instructor.from_openai(openai.OpenAI(api_key=os.environ.get('OPENAI_API_KEY', '')))\n# Example: extract structured data\nimport pydantic\nclass User(pydantic.BaseModel):\n    name: str\n    age: int\nuser = client.chat.completions.create(model=\"gpt-4o\", response_model=User, messages=[{\"role\": \"user\", \"content\": \"John Doe is 30\"}])\nprint(user.name, user.age)","lang":"python","description":"Instrument instructor to trace LLM calls and structured extraction. Ensure instructor and openai are installed.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}