SPB Git

spb/zyquo-local Public MIT

Native macOS AI chat that runs LLMs 100% locally on Apple Silicon with MLX — no cloud, no API keys.

Swift 97.2% Shell 1.8% Makefile 1%
1.2 KB · 46 lines swift
Raw Blame History
1//2//  Conversation.swift3//  Zyquo Local4//5//  Author: Simon-Pierre Boucher6//  Mail: contact@spboucher.ai7//89import Foundation1011/// A persisted chat conversation. Remembers its model and generation params.12struct Conversation: Identifiable, Codable, Hashable, Sendable {13    var id: UUID14    var title: String15    var messages: [Message]16    /// Repo ID of the model this conversation uses (e.g. "mlx-community/Qwen3-8B-4bit").17    var modelID: String?18    var systemPrompt: String?19    var params: GenerationParams20    var pinned: Bool21    var createdAt: Date22    var updatedAt: Date2324    init(25        id: UUID = UUID(),26        title: String = "New Chat",27        messages: [Message] = [],28        modelID: String? = nil,29        systemPrompt: String? = nil,30        params: GenerationParams = GenerationParams(),31        pinned: Bool = false,32        createdAt: Date = Date(),33        updatedAt: Date = Date()34    ) {35        self.id = id36        self.title = title37        self.messages = messages38        self.modelID = modelID39        self.systemPrompt = systemPrompt40        self.params = params41        self.pinned = pinned42        self.createdAt = createdAt43        self.updatedAt = updatedAt44    }45}46