Commit Graph

2 Commits

Author SHA1 Message Date
Krishna Kumar
80109d702c Add demo app with mock, Ollama, OpenAI, and Anthropic provider support
Example iOS app that seeds a task management SQLite database and
renders SwiftDBAI's DataChatView. Ships with a mock LLM for offline
use and an OllamaWithSystemPrompt wrapper that fixes AnyLanguageModel's
Ollama adapter dropping system instructions.

Tested successfully with:
- DemoLanguageModel (mock, pattern-matched SQL)
- Ollama qwen3-coder-30b (local, real SQL generation)
- OpenAI gpt-4o-mini (JOINs, GROUP BY, multi-turn)
- Anthropic claude-haiku-4.5 (complex aggregations)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 12:25:22 -05:00
Krishna Kumar
b1724fe7ca Initial implementation of SwiftDBAI
Chat with any SQLite database using natural language. Built on
AnyLanguageModel (HuggingFace) for LLM-agnostic provider support
and GRDB for SQLite access.

Core features:
- Auto schema introspection from sqlite_master (zero config)
- NL → SQL generation via any AnyLanguageModel provider
- Three rendering modes: text summary, data table, Swift Charts
- Drop-in DataChatView (SwiftUI) and headless ChatEngine
- Operation allowlist with read-only default
- Mutation policy with per-table control
- ToolExecutionDelegate for destructive operation confirmation
- Multi-turn conversation context
- 352 tests across 24 suites, all passing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 09:30:56 -05:00