In this example, we will use the dynamic
ContextMode, which automatically maintains a continuous conversation history instead of resetting the context with each new input. Every new message is added to the ongoing chat, allowing the model to remember what has already been said and respond with full context.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.