|
@@ -217,7 +217,9 @@ class ModelProviderFactory:
|
|
|
position_map = {}
|
|
|
if os.path.exists(position_file_path):
|
|
|
with open(position_file_path, 'r', encoding='utf-8') as f:
|
|
|
- position_map = yaml.safe_load(f)
|
|
|
+ positions = yaml.safe_load(f)
|
|
|
+ # convert list to dict with key as model provider name, value as index
|
|
|
+ position_map = {position: index for index, position in enumerate(positions)}
|
|
|
|
|
|
# traverse all model_provider_dir_paths
|
|
|
for model_provider_dir_path in model_provider_dir_paths:
|