CREATE TABLE IF NOT EXISTS room_ai (
    room UUID NOT NULL,
    model UUID NOT NULL,
    version UUID,
    call_count BIGINT NOT NULL DEFAULT 0,
    last_call_at TIMESTAMPTZ,
    history_limit BIGINT,
    system_prompt TEXT,
    temperature DOUBLE PRECISION,
    max_tokens BIGINT,
    use_exact BOOLEAN NOT NULL DEFAULT false,
    think BOOLEAN NOT NULL DEFAULT false,
    min_score REAL,
    created_at TIMESTAMPTZ NOT NULL,
    updated_at TIMESTAMPTZ NOT NULL,
    PRIMARY KEY (room, model)
);
