LLAMA

abstract class LLAMA : AI

Base class for AI models served via a local LLAMA server process.

Phases

  1. Intelligence — Detect OS (os.name) and architecture (os.arch)

  2. Fetch — Download the correct LLAMA-Server binary + GGUF model (with resume support)

  3. Ignition — Launch the server via ProcessBuilder on a local port

  4. Request — All inference goes through http://127.0.0.1:{port}/v1/chat/completions.

Crash isolation

Because the AI runs in a separate OS process, if the model runs out of RAM, the OS kills the LLAMA-Server process but the Formcycle Tomcat JVM does not even feel a bump.

Plugin properties

PropertyDefaultDescription
Active_AIMust contain llama_engine
AI_RemoveIf contains llama_engine, clean up all
AI_LLAMA_ENGINE_Port8392Local port for LLAMA-Server
AI_LLAMA_ENGINE_Threadsphysical coresNumber of CPU threads
AI_LLAMA_ENGINE_CtxSize32768Context window size (shared across parallel slots)
AI_LLAMA_ENGINE_GpuLayersauto-detectLayers offloaded to GPU (-1 = auto)
AI_LLAMA_ENGINE_Releaseb8175llama.cpp release tag for downloads
AI_LLAMA_ENGINE_ServerArgsExtra CLI args for LLAMA-Server
AI_LLAMA_ENGINE_MaxConcurrent2Maximum concurrent inferences allowed across all local servers
AI_LLAMA_ENGINE_Parallel4DEPRECATED Number of parallel inference slots per server (use MaxConcurrent instead)

Domains to whitelist

  • github.com — llama-server binary releases

  • objects.githubusercontent.com — GitHub release asset CDN

DSGVO / EU-AI Act

  • All data stays on the local machine.

  • No external API calls.

  • Same compliance advantages as all other CodBi AI implementations.

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

The companion for static members.

Functions

Link copied to clipboard
abstract fun execute(p0: IPluginServletActionParams): IPluginServletActionRetVal
Link copied to clipboard
Link copied to clipboard
open override fun getDisplayName(p0: Locale): String
Link copied to clipboard
abstract override fun getName(): String
Link copied to clipboard
open override fun initialize(configData: IPluginInitializeData)

Initializes the LLAMA infrastructure: creates directories, reads plugin properties. Subclasses should call super.initialize(configData) then proceed with downloading and starting the server.

Link copied to clipboard
open fun initPlugin()
Link copied to clipboard
open fun install(p0: IPluginInstallData)
Link copied to clipboard
open override fun shutdown(shutdownData: IPluginShutdownData?)

Shuts down the LLAMA-Server process and releases resources.

open fun shutdown()
Link copied to clipboard

Initiates a task that removes unused images that're expired (msExpirationIDedImages) from the cache (cacheIDedImages).

Link copied to clipboard
open fun uninstall(p0: IPluginUninstallData)
Link copied to clipboard
open override fun validateConfigurationData(configData: IPluginValidationData): IPluginInitializeValidationResult?

Rejects tenant-level installation. CodBi must be installed as a system plugin because its AI services (Whisper, LLAMA) bind local server ports and manage heavyweight processes that would conflict when instantiated once per tenant.