Skip to content

Add pydantic support for structured extraction - #57

Open
Yuvrajxms09 wants to merge 1 commit into
fastino-ai:mainfrom
Yuvrajxms09:pydantic
Open

Add pydantic support for structured extraction#57
Yuvrajxms09 wants to merge 1 commit into
fastino-ai:mainfrom
Yuvrajxms09:pydantic

Conversation

@Yuvrajxms09

Copy link
Copy Markdown
Contributor

closes #16

Overview

This PR adds Pydantic integration to make structured extraction more developer friendly and schemas can now be defined using standard python classes

Changes

  • PydanticConverter: maps python type hints and Field metadata into model prompts.
  • Schema.from_pydantic: buils schemas directly from pydantic models.
  • adds a filtering layer to handle partial extractions, so defaults and optional fields work without errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pydantic support

1 participant