File size: 483 Bytes
39b7b6a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from typing import Union

from pydantic import BaseModel


class FigureAnnotation(BaseModel):
    figure_id: str
    figure_description: str


class FigureAnnotations(BaseModel):
    annotations: list[FigureAnnotation]


class MedQAMCQResponse(BaseModel):
    answer: str
    explanation: str


class MedQACitation(BaseModel):
    page_number: int
    document_name: str


class MedQAResponse(BaseModel):
    response: Union[str, MedQAMCQResponse]
    citations: list[MedQACitation]