LMStudio is a SwiftUI-based chat application that allows users to create, manage, and participate in chat sessions. The app supports multiple chat threads and persists chat messages using a local storage mechanism.
- Multi-chat support: Users can create and switch between multiple chat sessions.
- Local chat history: Messages are saved and loaded automatically.
- Cross-platform UI: Supports macOS and iOS with adaptive navigation views.
- Modern SwiftUI design: Uses SwiftUI components like
NavigationSplitView
,TabView
, andPicker
.
- macOS 12+ or iOS 15+
- Xcode 14+
- Swift 5+
git clone <repository-url>
cd LMStudio
- Launch Xcode.
- Select File > Open and navigate to the
LMStudio
folder. - Open the project and wait for dependencies to resolve.
- Select the target device (iPhone, iPad, or Mac).
- Click Run (
⌘R
).
- LMStudioApp.swift: The main entry point of the app.
- ContentView.swift: Handles navigation between chat and settings.
- ChatView.swift: Displays chat messages and allows users to create/select conversations.
- ChatLogManager.swift: Manages storage and retrieval of chat messages.
- SettingsView.swift: Contains user-configurable settings.
The Settings section in LMStudio allows you to configure the following:
- API Settings
- API URL: Specify the endpoint that the app will use to connect with the backend server. By default, it is set to https://10.0.0.10:1234.
- Model Settings
- Model Picker: Choose from a list of available models that the app can use. This list is loaded dynamically by pressing the refresh button (🔄).
- Temperature: Adjust the creativity of the model’s responses. The value ranges from 0.0 (more deterministic) to 2.0 (more creative), with a default of 0.8.
- Max Tokens: Set the maximum number of tokens (words or word pieces) the model can generate in a response. The slider allows you to choose a value between 32 and 8192, with a default value of 512.
These settings let you customize the behavior of the chat AI, from its connection endpoint to the style and length of generated responses.
Pull requests are welcome! Please ensure that your changes align with the SwiftUI design principles.
This project is licensed under _.