A Native SwiftUI iOS Client for the OpenAI Assistants API
A professional-grade iOS application that brings the full power of OpenAI's Assistants API to your mobile device. Built entirely with SwiftUI and the Combine framework, OpenAssistant provides comprehensive assistant management, intelligent vector storage, and real-time conversations in a beautifully crafted native iOS experience.
OpenAssistant represents a new standard in native iOS development for AI interaction. Built from the ground up with SwiftUI and the Combine framework, this application delivers comprehensive access to OpenAI's Assistants API capabilities. From advanced conversation management to sophisticated file processing with vector stores, OpenAssistant transforms your iOS device into a powerful AI workspace.
Built with a robust Model-View-ViewModel pattern that ensures clean separation of concerns, exceptional testability, and maintainable code for enterprise-grade iOS development.
Harnesses the full power of the Combine framework to deliver real-time UI updates, seamless async operations, and responsive user interactions throughout the application lifecycle.
Thoughtfully organized into specialized modules including API services, chat functionality, assistant management, and vector store operations for maximum code reusability and maintainability.
Crafted exclusively with SwiftUI to deliver a truly native iOS experience with platform-specific design patterns, accessibility features, and performance optimizations.
Full lifecycle management of OpenAI Assistants with advanced configuration options including GPT-4o, O1-series models, fine-tuned temperature and reasoning effort controls, and custom instruction sets.
Seamlessly enable and configure powerful AI tools including Code Interpreter for programming tasks and File Search for document-based knowledge retrieval with advanced vector store integration.
Enterprise-grade vector store operations with full CRUD functionality. Create knowledge bases from documents and associate them with assistants for intelligent, context-aware responses.
Upload and process multiple file formats (PDF, TXT, DOCX, and more) with sophisticated chunking strategies. Advanced metadata management and seamless vector store integration.
Engage in sophisticated conversations with rich Markdown rendering, persistent message history, and intelligent thread management. Features loading states and real-time conversation updates.
Secure API key management using iOS secure storage, with robust local data persistence and privacy-focused design principles throughout the application.
Built using the Model-View-ViewModel (MVVM) pattern, the application provides a scalable and maintainable foundation for complex SwiftUI development.
Declarative UI built with SwiftUI components
Manages state and coordinates between View and Model
Handles external API calls and data persistence
Codable structs mirroring OpenAI API entities
Understanding how data flows through the application and how users interact with different features.
The application starts with OpenAssistantApp
, which initializes environment objects and checks for API key presence.
@StateObject private var assistantManagerViewModel = AssistantManagerViewModel()
The app securely stores the OpenAI API key using @AppStorage
and prompts for setup if missing.
@AppStorage("OpenAI_API_Key") private var apiKey: String = ""
MainTabView
provides tab-based navigation between Assistants, Management, Vector Stores, and Settings.
TabView { ForEach(Tab.allCases, id: \.self) { tab in ... } }
ViewModels interact with OpenAIService
to fetch assistants, create vector stores, and manage chat threads.
assistantManagerViewModel.fetchAssistants()
The app uses NotificationCenter
and Combine publishers for decoupled, real-time UI updates.
NotificationCenter.default.post(name: .settingsUpdated, object: nil)
Built with Swift's modern concurrency model using async/await and Combine publishers for reactive programming.
Local message storage with MessageStore and secure API key persistence using @AppStorage.
Comprehensive OpenAI API integration with dedicated service extensions for different endpoints.
Support for Light, Dark, and System appearance modes with responsive design principles.