File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed 
src/openai/types/evals/runs Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -27,12 +27,17 @@ class Result(BaseModel):
2727    type : Optional [str ] =  None 
2828    """The grader type (for example, "string-check-grader").""" 
2929
30-     __pydantic_extra__ : Dict [str , object ] =  FieldInfo (init = False )  # pyright: ignore[reportIncompatibleVariableOverride] 
3130    if  TYPE_CHECKING :
31+         # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a 
32+         # value to this field, so for compatibility we avoid doing it at runtime. 
33+         __pydantic_extra__ : Dict [str , object ] =  FieldInfo (init = False )  # pyright: ignore[reportIncompatibleVariableOverride] 
34+ 
3235        # Stub to indicate that arbitrary properties are accepted. 
3336        # To access properties that are not valid identifiers you can use `getattr`, e.g. 
3437        # `getattr(obj, '$type')` 
3538        def  __getattr__ (self , attr : str ) ->  object : ...
39+     else :
40+         __pydantic_extra__ : Dict [str , object ]
3641
3742
3843class  SampleInput (BaseModel ):
Original file line number Diff line number Diff line change @@ -27,12 +27,17 @@ class Result(BaseModel):
2727    type : Optional [str ] =  None 
2828    """The grader type (for example, "string-check-grader").""" 
2929
30-     __pydantic_extra__ : Dict [str , object ] =  FieldInfo (init = False )  # pyright: ignore[reportIncompatibleVariableOverride] 
3130    if  TYPE_CHECKING :
31+         # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a 
32+         # value to this field, so for compatibility we avoid doing it at runtime. 
33+         __pydantic_extra__ : Dict [str , object ] =  FieldInfo (init = False )  # pyright: ignore[reportIncompatibleVariableOverride] 
34+ 
3235        # Stub to indicate that arbitrary properties are accepted. 
3336        # To access properties that are not valid identifiers you can use `getattr`, e.g. 
3437        # `getattr(obj, '$type')` 
3538        def  __getattr__ (self , attr : str ) ->  object : ...
39+     else :
40+         __pydantic_extra__ : Dict [str , object ]
3641
3742
3843class  SampleInput (BaseModel ):
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments