Skip to content

Conversations

ConversationMessage

Bases: BaseModel

Individual message within a conversation.

Represents a single message exchange in a conversation, which can be from a user, assistant, or system. Messages may include text content and optional image attachments.

Attributes:

Name Type Description
id str

Unique identifier for the message

conversation_id str

ID of the conversation this message belongs to

message Optional[str]

Optional text content of the message

created_at datetime

Timestamp when the message was created

updated_at datetime

Timestamp when the message was last updated

role str

Role of the message sender (user, assistant, system)

images Optional[List[str]]

Optional list of image URLs or identifiers

CreateConversationResponse

Bases: BaseModel

Response data for newly created conversations.

Contains the essential information needed to begin interacting with a new conversation, including connection details and visual metadata.

Attributes:

Name Type Description
user_id str

ID of the user who created the conversation

conversation_id str

Unique identifier for the new conversation

websocket_url str

WebSocket URL for real-time conversation updates

deployment_id str

ID of the deployment handling the conversation

icon_id Optional[str]

Optional ID of the conversation icon

icon_url Optional[str]

Optional URL of the conversation icon

description Optional[str]

Optional description of the conversation

space_name Optional[str]

Optional name of the space containing the conversation

GetConversationResponse

Bases: BaseModel

Complete conversation data including messages and metadata.

This response contains all information about a conversation including its message history, associated files, execution status, and any content moderation actions that have been applied.

Attributes:

Name Type Description
user_id str

ID of the user who owns the conversation

conversation_id str

Unique identifier for the conversation

messages List[ConversationMessage]

List of messages in the conversation

title Optional[str]

Optional title for the conversation

websocket_url Optional[str]

Optional WebSocket URL for real-time updates

deployment_id Optional[str]

Optional ID of the deployment handling the conversation

data_source_files Dict[str, List[str]]

Dictionary mapping data sources to their files

is_bookmarked bool

Whether the conversation is bookmarked by the user

policy_redactions Optional[Dict[str, PolicyRedaction]]

Optional dictionary of policy violations and redactions

last_execution_status Optional[str]

Optional status of the last execution

last_execution_id Optional[str]

Optional ID of the last execution

PolicyRedaction

Bases: BaseModel

Information about content that was redacted due to policy violations.

When content in a conversation violates platform policies, this model tracks what was redacted and where it occurred.

Attributes:

Name Type Description
violating_text str

The text content that violated platform policies

violating_message_index int

Index of the message containing the violation