File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -40,14 +40,14 @@ def get_builtin_scenarios() -> list[str]:
4040    return  [p .stem  for  p  in  SCENARIO_DIR .glob ("*.json" )]
4141
4242
43- def  parse_float_list (value : str  |  float  |  list [float ]) ->  list [float ]:
43+ def  parse_float_list (value : str  |  float  |  list [float ]) ->  float   |   list [float ]:
4444    """ 
4545    Parse a comma separated string to a list of float 
4646    or convert single float list of one or pass float 
4747    list through. 
4848    """ 
4949    if  isinstance (value , (int , float )):
50-         return  [ value ] 
50+         return  float ( value ) 
5151    elif  isinstance (value , list ):
5252        return  value 
5353
@@ -128,9 +128,9 @@ class Config:
128128        SkipValidation ,
129129    ]
130130    profile : StrategyType  |  ProfileType  |  Profile 
131-     rate : Annotated [list [ PositiveFloat ]  |   None ,  BeforeValidator ( parse_float_list )]  =  ( 
132-         None 
133-     ) 
131+     rate : Annotated [
132+         PositiveFloat   |   list [ PositiveFloat ]  |   None ,  BeforeValidator ( parse_float_list ) 
133+     ]  =   None 
134134    random_seed : int  =  42 
135135    # Backend configuration 
136136    backend : BackendType  |  Backend  =  "openai_http" 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments