API Reference
All types use the ERP_ / UERP_ / FERP_ prefix and are Blueprint-accessible.
UERP_LLMComponent
The Blueprint-friendly entry point. Add it to an NPC or controller.
| Member | Kind | Description |
|---|---|---|
SystemPrompt | property FString | Persona / instructions |
GenerationConfig | property FERP_LLMGenerationConfig | Sampling params |
bAutoInitialize | property bool | Create context on BeginPlay |
SendMessage(UserMessage) | function → bool | Add user message + generate |
PushText(Text) | function | Pipeline sink (same as SendMessage) |
GenerateContinuation() | function → bool | Continue without new input |
ClearHistory() | function | Reset conversation (keeps system prompt) |
AddMessage(Message) | function | Pre-load a FERP_LLMMessage |
SetSystemPromptRuntime(Text) | function | Change persona at runtime |
IsLLMReady() | pure → bool | Backend loaded? |
OnGenerationComplete | event FERP_LLMResult | Full result + metrics |
OnText | event FString | Generated reply text — for chaining |
OnTokenGenerated | event FString | Per-token (when streaming) |
FERP_LLMGenerationConfig
| Field | Type | Default |
|---|---|---|
MaxTokens | int32 | 256 |
Temperature | float | 0.7 |
TopP | float | 0.9 |
TopK | int32 | 40 |
RepetitionPenalty | float | 1.1 |
StopSequences | TArray<FString> | — |
bEnableStreaming | bool | false |
FERP_LLMMessage / FERP_LLMResult
FERP_LLMMessage = { Role (System/User/Assistant), Content, Metadata }.
FERP_LLMResult = { GeneratedText, TokensGenerated, bCompleted, StopReason, ProcessingTimeMs, TokensPerSecond }.
UERP_LLMSubsystem
GameInstanceSubsystem owning the shared model.
| Member | Description |
|---|---|
InitializeBackend(Config) → bool | Load the GGUF model |
IsBackendInitialized() → bool | Ready state |
GetModelInfo() → FString | Loaded model description |
GetMaxContextLength() → int32 | Context window size |
CountTokens(Text) → int32 | Tokenize for budgeting |
IERP_LLMBackend
Implement to add a custom inference engine, then select Custom in settings.
UERP_LlamaCppBackend is the bundled implementation.