diff --git a/src/kili/adapters/kili_api_gateway/llm/mappers.py b/src/kili/adapters/kili_api_gateway/llm/mappers.py index abdde991d..51b505fd4 100644 --- a/src/kili/adapters/kili_api_gateway/llm/mappers.py +++ b/src/kili/adapters/kili_api_gateway/llm/mappers.py @@ -142,7 +142,14 @@ def map_import_conversations_input(conversations: List[Conversation]) -> Dict: return { "conversations": [ { - "chatItems": conversation["chat_items"], + "chatItems": [ + { + "content": chat_item["content"], + "role": chat_item["role"], + "modelName": chat_item.get("model_name"), + } + for chat_item in conversation["chat_items"] + ], "chatExternalId": conversation.get("chat_external_id"), "labeler": conversation["labeler"], "metadata": conversation.get("metadata"), diff --git a/src/kili/domain/llm.py b/src/kili/domain/llm.py index 001804432..f0df95785 100644 --- a/src/kili/domain/llm.py +++ b/src/kili/domain/llm.py @@ -140,6 +140,7 @@ class ChatItem(TypedDict): content: str id: str + model_name: Optional[str] role: ChatItemRole