Llama.Release
-------------

Releases the session.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Llama](component_Llama.md) | [16.1](newinversion161.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Llama.Release"; LlamaSession ) 

**MBS**( **"Llama.Release";** /\* Releases the session. \*/  
**$LlamaSession**) /\* The session identifier.e.g. $$session \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| LlamaSession | The session identifier. | $$session |

### Result

Returns OK or error.

### Description

Releases the session.  
Closes the sampler, model and context when needed.  
### Examples

Release if needed in a layout exit script:

 If \[ IsEmpty ( $$session ) \]  
 # nothing to do  
Else  
 Set Variable \[ $r ; Value: MBS ("Llama.Release"; $$session ) \]  
 Set Variable \[ $$session ; Value: "" \]  
End If  
### See also

- [Java.Release](JavaRelease.md)
- [Llama.New](LlamaNew.md)
- [Llama.ReleaseAll](LlamaReleaseAll.md)

### Example Databases

- [Llama chat](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Llama%20chat.shtml#3ScriptAnchor_)

### Blog Entries

- [Use Llama.cpp in FileMaker](https://www.mbsplugins.de/archive/2026-02-17/Use_Llamacpp_in_FileMaker/monkeybreadsoftware_blog_filemaker)

Created 10th February 2026 , last changed 12nd February 2026

  
[Llama.Query](LlamaQuery.md) - [Llama.ReleaseAll](LlamaReleaseAll.md)

[HTML Version](LlamaRelease.shtml)