pixano.features.schemas.entities.conversation
Conversation(created_at=None, updated_at=None, **data)
Bases: Entity
A Conversation
entity.
A conversation is an object refered by Message annotations via their entity_ref
attribute.
Attributes:
Name | Type | Description |
---|---|---|
kind |
str
|
Agnostic metadata to store information of the conversation. |
with_model |
SourceRef
|
Model source reference, or may refer to the groundtruth source. |
Source code in pixano/features/schemas/base_schema.py
create_conversation(kind, with_model=SourceRef.none(), id='', item_ref=ItemRef.none(), view_ref=ViewRef.none(), parent_ref=EntityRef.none())
Create a Conversation
instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
kind
|
str
|
Agnostic metadata to store information of the conversation. |
required |
with_model
|
SourceRef
|
Model source reference, or may refer to the groundtruth source. |
none()
|
id
|
str
|
Conversation ID. |
''
|
item_ref
|
ItemRef
|
Item reference. |
none()
|
view_ref
|
ViewRef
|
View reference. |
none()
|
parent_ref
|
EntityRef
|
Entity reference. |
none()
|
Returns:
Type | Description |
---|---|
Conversation
|
The created |
Source code in pixano/features/schemas/entities/conversation.py
is_conversation(cls, strict=False)
Check if the given class is a Conversation
or a subclass of Conversation
.