Skip to content

Commit

Permalink
feat(LAB-3307): add modelName on chat items for importConversations
Browse files Browse the repository at this point in the history
  • Loading branch information
paulruelle committed Dec 18, 2024
1 parent e2b5f07 commit 9d5fcf8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/kili/adapters/kili_api_gateway/llm/mappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
1 change: 1 addition & 0 deletions src/kili/domain/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ class ChatItem(TypedDict):

content: str
id: str
model_name: Optional[str]
role: ChatItemRole


Expand Down

0 comments on commit 9d5fcf8

Please sign in to comment.