Component: Llama 
-----------------

Use llama.cpp in FileMaker to run LLM AI models locally to enjoy some artifical intelligence.

| Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|
| [16.1](newinversion161.md "First functions introduced with version 16.1.") / [16.2](newinversion162.md "Newest functions in version 16.2.") | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

  
| Item | Details |
|:--|:--|
| [Llama.Backends](LlamaBackends.md)   Queries the backends available. | All   16.1 |
| [Llama.Chat](LlamaChat.md)   Sends a chat messages to the model. | All   16.1 |
| [Llama.ChatBuiltinTemplates](LlamaChatBuiltinTemplates.md)   Queres the list of built-in template names. | All   16.1 |
| [Llama.ClearTranscript](LlamaClearTranscript.md)   Clears the current transcript. | All   16.1 |
| [Llama.CloseContext](LlamaCloseContext.md)   Closes the context. | All   16.1 |
| [Llama.CloseModel](LlamaCloseModel.md)   Closes the current model. | All   16.1 |
| [Llama.CloseSampler](LlamaCloseSampler.md)   Closes the current sampler. | All   16.1 |
| [Llama.ContextAvailable](LlamaContextAvailable.md)   Queries context memory available. | All   16.1 |
| [Llama.ContextUsed](LlamaContextUsed.md)   Queries context memory used. | All   16.1 |
| [Llama.Detokenize](LlamaDetokenize.md)   Convert the provided tokens into text (inverse of llama\_tokenize()). | All   16.1 |
| [Llama.InitSampler](LlamaInitSampler.md)   Initializes the sampler chain. | All   16.1 |
| [Llama.List](LlamaList.md)   Lists all the current llama identifiers. | All   16.1 |
| [Llama.LoadBackend](LlamaLoadBackend.md)  **New in 16.2**    Loads a backend for Llama from the given location. | All   16.2 |
| [Llama.LoadLibrary](LlamaLoadLibrary.md)   Loads the library. | All   16.1 |
| [Llama.LoadModel](LlamaLoadModel.md)   Load the model from a file. | All   16.1 |
| [Llama.Loaded](LlamaLoaded.md)   Whether the library is loaded. | All   16.1 |
| [Llama.ModelChatTemplate](LlamaModelChatTemplate.md)   Queries the chat template text for the model. | All   16.1 |
| [Llama.ModelMetadata](LlamaModelMetadata.md)   Queries the metadata for a model. | All   16.1 |
| [Llama.ModelSize](LlamaModelSize.md)   Queries the model size. | All   16.1 |
| [Llama.New](LlamaNew.md)   Creates a new session. | All   16.1 |
| [Llama.Query](LlamaQuery.md)   Runs a text through the model. | All   16.1 |
| [Llama.Release](LlamaRelease.md)   Releases the session. | All   16.1 |
| [Llama.ReleaseAll](LlamaReleaseAll.md)   Releases all sessions. | All   16.1 |
| [Llama.StartContext](LlamaStartContext.md)   Initializes a context. | All   16.1 |
| [Llama.Tokenize](LlamaTokenize.md)   Convert the provided text into tokens. | All   16.1 |
| [Llama.Transcript](LlamaTranscript.md)   Queries the transcript. | All   16.1 |
| [Llama.TranscriptJSON](LlamaTranscriptJSON.md)   Queries the transcript as JSON. | All   16.1 |

27 functions shown.

### Release notes

- **Version 16.2**
    - Added [Llama.LoadBackend](https://www.mbsplugins.eu/LlamaLoadBackend.shtml) function.
    - Fixed an issue with [Llama.Chat](https://www.mbsplugins.eu/LlamaChat.shtml) when the chat template couldn't be applied causing an exception.
- **Version 16.1**
    - Added [Llama](https://www.mbsplugins.eu/component_Llama.shtml) functions to load local large language models to query them.

### Blog Entries

- [MBS FileMaker Plugin 16.2 News](https://www.mbsplugins.de/archive/2026-05-20/MBS_FileMaker_Plugin_162_News/monkeybreadsoftware_blog_filemaker)
- [AI Development with the MBS FileMaker Plugin](https://www.mbsplugins.de/archive/2026-04-16/AI_Development_with_the_MBS_Fi/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 16.1 für Claris FileMaker](https://www.mbsplugins.de/archive/2026-03-17/Neues_MBS_Plugin_161_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 16.1 for Claris FileMaker - More than 7800 functions in one plugin](https://www.mbsplugins.de/archive/2026-03-17/MBS_FileMaker_Plugin_161_for_C/monkeybreadsoftware_blog_filemaker)
- [Use Llama.cpp in FileMaker](https://www.mbsplugins.de/archive/2026-02-17/Use_Llamacpp_in_FileMaker/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 16.1pr3](https://www.mbsplugins.de/archive/2026-02-16/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

### Example Databases

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

[HTML Version](component_Llama.shtml)