llama-cpp-wasm / actions.js
lemonteaa
add current repo
999eb85
Raw History Blame Contribute Delete
640 Bytes
// Message protocol between the page, the LLM wrapper and the inference worker.
// Same event set llm.js had, plus what streaming downloads and a model library
// need.
export const action = {
LOAD: 0,
INITIALIZED: 1,
RUN_MAIN: 2,
WRITE_RESULT: 3,
RUN_COMPLETED: 4,
ERROR: 5,
PROGRESS: 6,
LOG: 7,
PAUSE: 8,
PAUSED: 9,
RESUME: 10,
DELETE_MODEL: 11,
DELETED: 12,
LIST_MODELS: 13,
MODELS: 14,
ADD_URL: 15,
ADD_FILE: 16,
MODEL_ADDED: 17,
MODEL_UPDATED: 18,
HASH_MODEL: 19,
PREVIEW_TEMPLATE: 20,
TEMPLATE_PREVIEW: 21,
RELOAD_MODEL: 22,
STOP: 23,
};