# Extractor

Utilities for extracting and applying field descriptions from Pydantic models.

::: dspydantic.extractor.extract_field_descriptions
    options:
      show_root_heading: true
      show_source: true

::: dspydantic.extractor.extract_field_types
    options:
      show_root_heading: true
      show_source: true

::: dspydantic.extractor.create_optimized_model
    options:
      show_root_heading: true
      show_source: true

::: dspydantic.extractor.apply_optimized_descriptions
    options:
      show_root_heading: true
      show_source: true

## Functions

### extract_field_descriptions

Extract field descriptions from a Pydantic model recursively.

### extract_field_types

Extract field types from a Pydantic model recursively.

### create_optimized_model

Create a new Pydantic model class with optimized descriptions.

### apply_optimized_descriptions

Get optimized JSON schema without creating a new model class.

## See Also

- [Optimization Modalities](../../guides/optimization/modalities.md)
- [Nested Models](../../guides/advanced/nested-models.md)
