Chats
albert.resources.chats
ChatComponentType
Component type of a chat message.
Attributes:
| Name | Type | Description |
|---|---|---|
TEXT |
|
|
IMAGE |
|
|
REASONING_BLOCK |
|
|
NOTEBOOK_CITATION |
|
|
PRODUCT_CARD |
|
|
INGREDIENT_CARD |
|
ChatUserType
ChatRole
ChatFolderType
ChatSession
Bases: BaseResource
A persistent chat session.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str | None
|
The session ID assigned by the server. |
name |
str
|
The display name of the session. |
parent_id |
str | None
|
Optional folder ID that contains this session. |
source_session_id |
str | None
|
Optional external session identifier for linking to a source system. |
ChatMessage
Bases: BaseResource
A single message component within a chat session.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str | None
|
The message ID assigned by the server. |
source_request_id |
str | None
|
Client-generated request trace identifier. Auto-generated on create if not set. |
sequence |
str | None
|
Zero-padded position of this message in the session (e.g. "000", "001"). |
component_type |
ChatComponentType
|
The type of message component (e.g. text, image, reasoning_block). |
user_type |
ChatUserType
|
Whether the message originates from a user or the system. |
role |
ChatRole
|
The LLM conversation role (user or assistant). |
content |
str | dict[str, Any]
|
Component-type-specific payload; a string or free-form object. |
parent_id |
str | None
|
The session ID this message belongs to. Present in GET responses; derived from the URL path on create. |
component_id |
str | None
|
Component instance identifier. |
parent_request_id |
str | None
|
Parent request ID for branched messages. |
branch_index |
int | None
|
Branch index for branched messages. |
span_id |
str | None
|
Span/trace identifier. |
is_visible |
bool | None
|
Whether the component is visible in the UI. |
display_feedback |
bool | None
|
Whether to show the feedback UI for this message. |
ChatFolder
Bases: BaseResource
A folder used to organise chat sessions.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str | None
|
The folder ID assigned by the server. |
name |
str
|
The display name of the folder. |
folder_type |
ChatFolderType | None
|
Whether this is a root or child folder. |
parent_id |
str | None
|
Optional parent folder ID for nested folders. |