@@ -77,7 +77,7 @@ class Patient(BaseModel):
7777
7878
7979# DSPy Signature for patient information extraction from images
80- class PatientExtractionSignature (dspy .Signature ): # type: ignore[misc]
80+ class PatientExtractionSignature (dspy .Signature ):
8181 """Extract structured patient information from a medical intake form image."""
8282
8383 form_images : list [dspy .Image ] = dspy .InputField (
@@ -88,7 +88,7 @@ class PatientExtractionSignature(dspy.Signature): # type: ignore[misc]
8888 )
8989
9090
91- class PatientExtractor (dspy .Module ): # type: ignore[misc]
91+ class PatientExtractor (dspy .Module ):
9292 """DSPy module for extracting patient information from intake form images."""
9393
9494 def __init__ (self ) -> None :
@@ -98,7 +98,7 @@ def __init__(self) -> None:
9898 def forward (self , form_images : list [dspy .Image ]) -> Patient :
9999 """Extract patient information from form images and return as a Pydantic model."""
100100 result = self .extract (form_images = form_images )
101- return result .patient # type: ignore
101+ return result .patient
102102
103103
104104@cocoindex .op .function (cache = True , behavior_version = 1 )
@@ -123,7 +123,7 @@ def extract_patient(pdf_content: bytes) -> Patient:
123123 extractor = PatientExtractor ()
124124 patient = extractor (form_images = form_images )
125125
126- return patient # type: ignore
126+ return patient
127127
128128
129129@cocoindex .flow_def (name = "PatientIntakeExtractionDSPy" )
0 commit comments