File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1884,7 +1884,17 @@ def reachable(host: str, port: int) -> bool:
18841884ENABLE_USER_STATUS = os .getenv ('ENABLE_USER_STATUS' , 'True' ).lower () == 'true'
18851885
18861886ENABLE_EVALUATION_ARENA_MODELS = os .getenv ('ENABLE_EVALUATION_ARENA_MODELS' , 'True' ).lower () == 'true'
1887- EVALUATION_ARENA_MODELS = []
1887+ try :
1888+ evaluation_arena_models = json .loads (os .getenv ('EVALUATION_ARENA_MODELS' , '[]' ))
1889+ if not isinstance (evaluation_arena_models , list ) or not all (
1890+ isinstance (model , dict ) for model in evaluation_arena_models
1891+ ):
1892+ raise ValueError ('EVALUATION_ARENA_MODELS must be a JSON list of objects' )
1893+ except Exception as e :
1894+ log .exception (f'Error loading EVALUATION_ARENA_MODELS: { e } ' )
1895+ evaluation_arena_models = []
1896+
1897+ EVALUATION_ARENA_MODELS = evaluation_arena_models
18881898
18891899DEFAULT_ARENA_MODEL = {
18901900 'id' : 'arena-model' ,
You can’t perform that action at this time.
0 commit comments