Llama.CloseSampler
------------------

Closes the current sampler.

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

MBS( "Llama.CloseSampler"; LlamaSession ) 

**MBS**( **"Llama.CloseSampler";** /\* Closes the current sampler. \*/  
**$LlamaSession**) /\* The session identifier.e.g. $$session \*/ 

### Parameters

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

### Result

Returns OK or error.

### Description

Closes the current sampler.  
### See also

- [Llama.InitSampler](LlamaInitSampler.md)

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

  
[Llama.CloseModel](LlamaCloseModel.md) - [Llama.ContextAvailable](LlamaContextAvailable.md)

[HTML Version](LlamaCloseSampler.shtml)