Chat (v1)
Reference for magick_mind.models.v1.chat.
magick_mind.models.v1.chat
V1 chat API models.
REST models only. Realtime event models live in magick_mind.realtime.events.
ConfigSchema
class ConfigSchema(BaseModel)Configuration for chat request.
ChatSendRequest
class ChatSendRequest(BaseModel)Request to send a chat message to a mindspace.
Example:
request = ChatSendRequest( api_key="sk-...", mindspace_id="mind-123", message="Hello!", enduser_id="user-456", config=ConfigSchema( fast_model_id="gpt-4", smart_model_ids=["gpt-4"], compute_power=50, ), )
ChatSendRequest.serialize_artifact_ids
@field_serializer("artifact_ids")
def serialize_artifact_ids(v: list[str] | None) -> list[str]API requires this field; default to empty list if not provided.
ChatAck
class ChatAck(BaseModel)REST acknowledgement payload from the API POST /v1/chat/magickmind.
API ChatSchema: { message_id, content, reply_to }
The message_id is useful for registering reply anchors before the realtime event arrives via Centrifugo.
NOTE: This does NOT contain the AI response text — that arrives via Centrifugo realtime as a WsEvent/ChatMessagePayload.
ChatSendResponse
class ChatSendResponse(BaseModel)Response from the API POST /v1/chat/magickmind.
This is an acknowledgement only. The actual AI response text arrives via Centrifugo realtime — subscribe via client.realtime and handle WsEvent events with type="chat_message".