digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::SearchLlamaWorker Class Reference

Worker object living on the worker thread. More...

Inheritance diagram for Digikam::SearchLlamaWorker:

Public Slots

void slotDoInference (const QString &prompt, int maxTokens, float temperature)
void slotDoLoad (const QString &modelPath)
void slotDoUnload ()

Signals

void signalCancelled ()
void signalError (const QString &message)
void signalLoaded (bool success)
void signalLoadProgress (int percent)
void signalOutputReady (const QString &output)
void signalProgress (int step)

Public Member Functions

 SearchLlamaWorker (QObject *const parent=nullptr)
bool abortRequested () const
 Thread-safe check used by the llama.cpp abort callback to stop an in-progress decode when cancellation has been requested.
void reportLoadProgress (float progress)
 Relay model-load progress (0.0-1.0) from the llama.cpp progress callback to the GUI as a percentage.
void requestCancel ()

Detailed Description

Owns the llama.cpp model and context. All llama_* calls happen here, never on the GUI thread.