In this example, we will use the static
ContextMode, which begins with an initial list of messages defining the base context of the conversation, such as predefined instructions. Unlike dynamic mode, this context is fixed and does not evolve with new messages. Each inference request is processed independently, using only the initial context and the latest input, without retaining any previous conversation history.1
Create a new SwiftUI project

2
Add the SDK
Add this package through SPM:
4
Paste the snippet
Go to
ContentView.swift and add this snippet:5
Add the snippet call
Now that we’ve tried the simplest snippet, let’s take a look at the step-by-step integration guide.