Last active
October 23, 2024 10:20
-
-
Save manisnesan/cad8f7e17e5891d7136d3d55da3f0ff7 to your computer and use it in GitHub Desktop.
Qna.yaml as Pydantic Data Model with YAML to Pydantic Conversions This script defines a Pydantic data model for a Q&A system based on a YAML structure. It includes classes for handling questions and answers, document chunks, and overall document metadata. The model supports validation for SHA1 commit hashes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Key Features:
QuestionAnswer
,DocChunkQnA
,Doc
, andILabQnA
classes for structured data.pydantic_to_yaml
andyaml_to_pydantic
).field_validator
to enforce constraints on fields, such as SHA1 format for commits.Installation:
Usage: