Skip to content

A native macOS / windows / Linux database IDE built with Swift and AppKit. Connect to PostgreSQL, MySQL, SQLite, and Redis from a single app with a fast, keyboard-driven interface.

C++
535 B
Raw Blame
// LLMService.swift
// Gridex
//
// Protocol for LLM provider integration.
// Supports streaming responses from Anthropic, OpenAI, and Ollama.

import Foundation

protocol LLMService: Sendable {
    var providerName: String { get }

    func stream(
        messages: [LLMMessage],
        systemPrompt: String,
        model: String,
        maxTokens: Int,
        temperature: Double
    ) -> AsyncThrowingStream<String, Error>

    func availableModels() async throws -> [LLMModel]
    func validateAPIKey() async throws -> Bool
}