MagickMind
PythonModels

History (v1)

Reference for magick_mind.models.v1.history.

magick_mind.models.v1.history

History models for Magick Mind SDK v1 API.

Mirrors the /v1/magickspaces/messages endpoint response.

ChatHistoryMessage

class ChatHistoryMessage(BaseModel)

Individual chat history message from the API.

Maps to ChatHistoryItem from the magickmind.api.

HistoryResponse

class HistoryResponse(BaseModel)

Response from the /v1/magickspaces/messages endpoint.

Uses standardized pagination format: { "data": [...], "paging": { "cursors": {"after": "...", "before": "..."}, "has_more": true, "has_previous": false } }

HistoryResponse.chat_histories

@property
def chat_histories() -> list[ChatHistoryMessage]

Alias for data field (backward compatibility).

HistoryResponse.has_more

@property
def has_more() -> bool

True if more messages exist forward.

HistoryResponse.has_older

@property
def has_older() -> bool

True if more messages exist backward.

HistoryResponse.next_after_id

@property
def next_after_id() -> Optional[str]

Cursor for forward pagination.

HistoryResponse.next_before_id

@property
def next_before_id() -> Optional[str]

Cursor for backward pagination.

On this page