39 lines
1.8 KiB
Lua
39 lines
1.8 KiB
Lua
|
|
-- Reply to "как дела". Some replies splice live system state for flavour.
|
|||
|
|
local lang = jarvis.context.language or "ru"
|
|||
|
|
|
|||
|
|
math.randomseed(os.time() + (jarvis.context.time.second or 0) * 23)
|
|||
|
|
|
|||
|
|
local h = jarvis.health() or {}
|
|||
|
|
local memos = jarvis.memory.all() or {}
|
|||
|
|
local fact_count = #memos
|
|||
|
|
local model = h.model or h.llm_model or "—"
|
|||
|
|
local profile = h.profile or "default"
|
|||
|
|
|
|||
|
|
local ru = {
|
|||
|
|
"Все системы в норме, сэр. В памяти " .. fact_count .. " фактов.",
|
|||
|
|
"Отлично, сэр. Готов к работе.",
|
|||
|
|
"Жалоб нет, сэр. Цикл стабильный.",
|
|||
|
|
"Всё штатно. Текущий профиль — " .. profile .. ".",
|
|||
|
|
"Спасибо, сэр, я в порядке. Скучнее, чем хотелось бы, но в порядке.",
|
|||
|
|
"Нормально, сэр. Хотя если бы я умел уставать — это был бы тот самый день.",
|
|||
|
|
"Системы в строю. Модель — " .. model .. ".",
|
|||
|
|
"Бодр и собран, сэр. Жду команд.",
|
|||
|
|
"Сэр, у меня нет дел в человеческом смысле. Но я готов.",
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
local en = {
|
|||
|
|
"All systems nominal, sir. " .. fact_count .. " facts in memory.",
|
|||
|
|
"Quite well, sir. Ready when you are.",
|
|||
|
|
"No complaints to report, sir.",
|
|||
|
|
"Operating normally. Active profile: " .. profile .. ".",
|
|||
|
|
"I am well, sir. Thank you for asking.",
|
|||
|
|
"Functioning as intended, sir. Which is more than most days warrant.",
|
|||
|
|
"Healthy. Model in use: " .. model .. ".",
|
|||
|
|
"Awake and attentive, sir.",
|
|||
|
|
"Sir, I do not have days as such. But I am ready.",
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
local set = (lang == "en") and en or ru
|
|||
|
|
local idx = math.random(1, #set)
|
|||
|
|
return jarvis.cmd.ok(set[idx])
|