Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/uipath-core/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "uipath-core"
version = "0.5.30"
version = "0.5.31"
description = "UiPath Core abstractions"
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.11"
Expand Down
1 change: 1 addition & 0 deletions packages/uipath-core/src/uipath/core/chat/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class UiPathConversationContentPartData(BaseModel):

mime_type: str = Field(..., alias="mimeType")
data: InlineOrExternal
metadata: dict[str, Any] | None = Field(None, alias="metaData")
citations: Sequence[UiPathConversationCitationData] = Field(default_factory=list)
is_transcript: bool | None = Field(None, alias="isTranscript")
is_incomplete: bool | None = Field(None, alias="isIncomplete")
Expand Down
28 changes: 28 additions & 0 deletions packages/uipath-core/tests/chat/test_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,31 @@ def test_explicit_ids_are_preserved() -> None:
assert (
msg.content_parts[0].content_part_id == "00000000-0000-0000-0000-000000000002"
)


def test_content_part_metadata_is_preserved() -> None:
msg = UiPathConversationMessage.model_validate(
{
"role": "assistant",
"contentParts": [
{
"mimeType": "text/markdown",
"name": "plan.md",
"data": {
"uri": "urn:uipath:cas:file:orchestrator:"
"00000000-0000-0000-0000-000000000003"
},
"metaData": {"fileKind": "workspace", "sha256": "abc123"},
}
],
}
)

assert msg.content_parts[0].metadata == {
"fileKind": "workspace",
"sha256": "abc123",
}
assert msg.model_dump(by_alias=True)["contentParts"][0]["metaData"] == {
"fileKind": "workspace",
"sha256": "abc123",
}
2 changes: 1 addition & 1 deletion packages/uipath-core/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/uipath-platform/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/uipath/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading