Skip to content

Commit 5cfc1da

Browse files
paulruellebaptiste-olivier
authored andcommitted
feat(LAB-3168): remove status from CreateLLMAsset resolver
1 parent defa668 commit 5cfc1da

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/kili/adapters/kili_api_gateway/llm/operations_mixin.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,11 @@ def create_llm_asset(
171171
self,
172172
project_id: str,
173173
author_id: str,
174-
status: Optional[str] = None,
175174
label_type: Optional[str] = None,
176175
) -> Dict:
177176
"""Create an LLM asset in a project, with optional status and label_type."""
178177
where = map_project_where(project_id)
179-
data = {"author_id": author_id, "status": status, "label_type": label_type}
178+
data = {"author_id": author_id, "label_type": label_type}
180179
data_mapped = map_create_llm_asset_input(data)
181180
variables = {"where": where, "data": data_mapped}
182181
fragment = fragment_builder(["id", "latestLabel.id"])

src/kili/llm/presentation/client/llm.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,12 @@ def create_conversation(self, project_id: str, prompt: str) -> List[ChatItemDict
384384
Notes:
385385
- The first chat item corresponds to the user's prompt.
386386
- The subsequent chat items are assistant responses generated by the project's models.
387-
- An LLM asset and a label are created in the project with status "TODO" and labelType "PREDICTION".
387+
- An LLM asset and a label are created in the project with labelType "PREDICTION".
388388
"""
389389
user_id = self.kili_api_gateway.get_current_user(["id"])["id"]
390390
llm_asset = self.kili_api_gateway.create_llm_asset(
391391
project_id=project_id,
392392
author_id=user_id,
393-
status="TODO",
394393
label_type="PREDICTION",
395394
)
396395
asset_id = llm_asset["id"]

tests/unit/llm/test_create_conversation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def test_create_conversation(mocker):
2424

2525
kili_api_gateway.get_current_user.assert_called_once_with(["id"])
2626
kili_api_gateway.create_llm_asset.assert_called_once_with(
27-
project_id="project_id", author_id="user_id", status="TODO", label_type="PREDICTION"
27+
project_id="project_id", author_id="user_id", label_type="PREDICTION"
2828
)
2929
kili_api_gateway.create_chat_item.assert_called_once_with(
3030
asset_id="asset_id", label_id="label_id", prompt="prompt text"

0 commit comments

Comments
 (0)