Skip to main content
In this example, we will download a model and get a reply to a specific list of messages.
1

Create a new project

2

Install dependencies

3

Paste into main.py

4

Run the snippet

Once loaded, the same ChatSession can be reused for multiple requests until you drop it. Each model may consume a significant amount of RAM, so it’s important to keep only one session loaded at a time. For iOS apps, we recommend adding the Increased Memory Capability entitlement to ensure your app can allocate the required memory.