diff --git a/pyproject.toml b/pyproject.toml index f1767a7ee..76963d3ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"] [project] name = "kili" -version = "2.162.0" +version = "2.162.1" description = "Python client for Kili Technology labeling tool" readme = "README.md" authors = [{ name = "Kili Technology", email = "contact@kili-technology.com" }] diff --git a/src/kili/__init__.py b/src/kili/__init__.py index 598733747..3cea61a98 100644 --- a/src/kili/__init__.py +++ b/src/kili/__init__.py @@ -1,3 +1,3 @@ """Kili Python SDK.""" -__version__ = "2.162.0" +__version__ = "2.162.1" diff --git a/src/kili/llm/services/export/dynamic.py b/src/kili/llm/services/export/dynamic.py index 374e11294..b0ddedf2c 100644 --- a/src/kili/llm/services/export/dynamic.py +++ b/src/kili/llm/services/export/dynamic.py @@ -148,7 +148,7 @@ def _build_rounds(self, chat_items, annotations, json_interface): if role == "user": current_round["prompt"] = chat_item elif role == "system": - current_round["pre_prompt"].append(chat_item) + current_round["pre_prompts"].append(chat_item) elif role == "assistant": current_round["completion"].append(chat_item) else: diff --git a/tests/unit/llm/services/export/test_dynamic.py b/tests/unit/llm/services/export/test_dynamic.py index 49480483e..fff2e6ab2 100644 --- a/tests/unit/llm/services/export/test_dynamic.py +++ b/tests/unit/llm/services/export/test_dynamic.py @@ -110,12 +110,20 @@ "lastname": "Admin", }, "chatItems": [ + { + "id": "cm2u6kgcc001aj7ja1stsbrvu", + "content": "You are a helpful assistant", + "createdAt": "2024-08-06T12:28:52.170Z", + "modelId": None, + "parentId": None, + "role": "SYSTEM", + }, { "id": "clziefeh6003k7tc99abderkk", "content": "describe turtle in 100 words", "createdAt": "2024-08-06T12:30:52.170Z", "modelId": None, - "parentId": None, + "parentId": "cm2u6kgcc001aj7ja1stsbrvu", "role": "USER", }, { @@ -215,6 +223,13 @@ { "0": { "raw_data": [ + { + "id": "cm2u6kgcc001aj7ja1stsbrvu", + "role": "system", + "chat_id": "clzief6q2003e7tc91jm46uii", + "content": "You are a helpful assistant", + "model": None, + }, { "content": "describe turtle in 100 words", "role": "user", @@ -269,6 +284,13 @@ }, "1": { "raw_data": [ + { + "id": "cm2u6kgcc001aj7ja1stsbrvu", + "role": "system", + "chat_id": "clzief6q2003e7tc91jm46uii", + "content": "You are a helpful assistant", + "model": None, + }, { "content": "describe turtle in 100 words", "role": "user", @@ -337,6 +359,13 @@ }, "2": { "raw_data": [ + { + "id": "cm2u6kgcc001aj7ja1stsbrvu", + "role": "system", + "chat_id": "clzief6q2003e7tc91jm46uii", + "content": "You are a helpful assistant", + "model": None, + }, { "content": "describe turtle in 100 words", "role": "user",