diff --git a/src/kili/llm/services/export/dynamic.py b/src/kili/llm/services/export/dynamic.py index 3519e590c..be3b8a58f 100644 --- a/src/kili/llm/services/export/dynamic.py +++ b/src/kili/llm/services/export/dynamic.py @@ -33,8 +33,8 @@ ASSET_NEEDED_FIELDS = [ "assetProjectModels.id", + "assetProjectModels.projectModelId", "assetProjectModels.configuration", - "assetProjectModels.name", "content", "externalId", "jsonMetadata", @@ -254,7 +254,7 @@ def _format_models_object(models, obfuscated_models): for model in models: model_configuration = { "id": model["id"], - "name": model["name"], + "projectModelId": model["projectModelId"], "configuration": model["configuration"], } res[obfuscated_models[model["id"]]] = model_configuration diff --git a/tests/unit/llm/services/export/test_dynamic.py b/tests/unit/llm/services/export/test_dynamic.py index a02c1d900..81613bd3d 100644 --- a/tests/unit/llm/services/export/test_dynamic.py +++ b/tests/unit/llm/services/export/test_dynamic.py @@ -195,13 +195,13 @@ "assetProjectModels": [ { "id": "clzief6pr003c7tc99680e8yj", - "name": "ProjectModelA", - "configuration": {"temperature": 1, "model": "auto"}, + "projectModelId": "ProjectModelA", + "configuration": {"temperature": 1, "model": "my-model-1"}, }, { "id": "clzief6ps003d7tc9fzgj2xkf", - "name": "ProjectModelB", - "configuration": {"temperature": 0.5, "model": "auto"}, + "projectModelId": "ProjectModelB", + "configuration": {"temperature": 0.5, "model": "my-model-2"}, }, ], "externalId": "clzief6pg003a7tc9cn0p1obf", @@ -242,19 +242,19 @@ "models": { "A": { "configuration": { - "model": "auto", + "model": "my-model-1", "temperature": 1, }, "id": "clzief6pr003c7tc99680e8yj", - "name": "ProjectModelA", + "projectModelId": "ProjectModelA", }, "B": { "configuration": { - "model": "auto", + "model": "my-model-2", "temperature": 0.5, }, "id": "clzief6ps003d7tc9fzgj2xkf", - "name": "ProjectModelB", + "projectModelId": "ProjectModelB", }, }, "labels": [ @@ -310,19 +310,19 @@ "models": { "A": { "configuration": { - "model": "auto", + "model": "my-model-1", "temperature": 1, }, "id": "clzief6pr003c7tc99680e8yj", - "name": "ProjectModelA", + "projectModelId": "ProjectModelA", }, "B": { "configuration": { - "model": "auto", + "model": "my-model-2", "temperature": 0.5, }, "id": "clzief6ps003d7tc9fzgj2xkf", - "name": "ProjectModelB", + "projectModelId": "ProjectModelB", }, }, "labels": [ @@ -392,19 +392,19 @@ "models": { "A": { "configuration": { - "model": "auto", + "model": "my-model-1", "temperature": 1, }, "id": "clzief6pr003c7tc99680e8yj", - "name": "ProjectModelA", + "projectModelId": "ProjectModelA", }, "B": { "configuration": { - "model": "auto", + "model": "my-model-2", "temperature": 0.5, }, "id": "clzief6ps003d7tc9fzgj2xkf", - "name": "ProjectModelB", + "projectModelId": "ProjectModelB", }, }, "labels": [