Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

feat: add core uipath CAS data types for outputs/evals - #42

Merged
maxduu merged 1 commit into
mainfrom
uipath-cas-core-data-types
Feb 18, 2026
Merged

feat: add core uipath CAS data types for outputs/evals#42
maxduu merged 1 commit into
mainfrom
uipath-cas-core-data-types

Conversation

@maxduu

@maxduu maxduu commented Feb 17, 2026

Copy link
Copy Markdown
Contributor

Adds core data types as per this document.

This is to enable implementing outputs for low-code Conversational Agents, which are needed for evals.

Note:

Main change for the existing types is using Sequence rather than List. This is because to enable the model overrides for extending classes, needed to use Sequence which is invariant - to prevent errors like:

src/uipath/core/chat/message.py:89: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
src/uipath/core/chat/message.py:89: note: Consider using "Sequence" instead, which is covariant

For example, using Sequence is okay since it is invariant while list is not, meaning citations: Sequence[UiPathConversationCitation] can properly override citations: Sequence[UiPathConversationCitationData] because UiPathConversationCitation extends UiPathConversationCitationData. That is, the following works:

class UiPathConversationContentPartData(BaseModel):
   ...
   citations: Sequence[UiPathConversationCitationData]    # list would get above error


class UiPathConversationContentPart(UiPathConversationContentPartData):
    ...
    citations: Sequence[UiPathConversationCitation]

The only drawback here is that the list wouldn't be appendable after it is set on the class - e.g. after content_part.citations is set. This does not affect any of the uipath-agents / uipath-langchain / etc. code since they don't currently initialize these API classes (only use event classes). In cases they do, new code would need to build the lists on the outside and initialize the field with understanding that it would be readonly.

@maxduu
maxduu force-pushed the uipath-cas-core-data-types branch from 5fa3372 to c3fe980 Compare February 18, 2026 18:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants