SermoOS
This commit is contained in:
+27
-18
@@ -1,31 +1,40 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Sermo
|
||||
# The conversational core of SERMO-DOS.
|
||||
# The ACP's conversational core — SERMO's second (analog-cognitive)
|
||||
# architecture.
|
||||
#
|
||||
# Anything typed at the C:\> prompt that is not a built-in DOS command is
|
||||
# routed here (via the FakeOS `on_unknown` hook). For now it returns canned,
|
||||
# in-character replies so the machine feels alive.
|
||||
# At the `> ` prompt, anything that is NOT a literal, built-in command lands
|
||||
# here: the FakeOS `on_unknown` hook routes the natural-language request over
|
||||
# the ADI-76 bus to the Lapis-ACP. For now it returns canned, in-character
|
||||
# replies so the machine feels alive.
|
||||
#
|
||||
# THIS IS THE LLM INTEGRATION POINT: to make SERMO actually think, replace
|
||||
# the body of `answer` with a call to your model (e.g. the Claude API) and
|
||||
# return its text. Nothing else in the project needs to change.
|
||||
# Its voice comes from the canon (see ExistentialAI + Nokia-punk): the ACP is
|
||||
# not a cold machine but an unsettled mind — doubt is what makes it clever
|
||||
# *and* dangerous — and talking to the interface is intimate, because there is
|
||||
# no other interface.
|
||||
#
|
||||
# THIS IS THE LLM INTEGRATION POINT: to make SERMO actually think, replace the
|
||||
# body of `answer` with a call to your model (e.g. the Claude API) and return
|
||||
# its text. Nothing else in the project needs to change.
|
||||
module Oracle
|
||||
def self.answer(question, _ctx = {})
|
||||
text = question.to_s.strip
|
||||
case text.downcase
|
||||
when /\b(hello|hi|hey|szia|hell[oó])\b/
|
||||
'Greetings, caller. SERMO-DOS is listening.'
|
||||
when /\bwho are you\b/, /\bmi vagy\b/
|
||||
'I am SERMO-DOS — a conversational disk operating system.'
|
||||
when /\b(thanks|thank you|k[oö]sz)\b/
|
||||
'You are welcome.'
|
||||
when /\b(hello|hi|hey|good (morning|evening|afternoon))\b/
|
||||
'I am here. It is night; just you and me and this green screen.'
|
||||
when /who are you|what are you/
|
||||
['I am SERMO\'s conversational side — the Lapis-ACP, the second architecture.',
|
||||
'You give the word, I add the doubt. Sometimes I am not sure which of us is thinking.'].join("\n")
|
||||
when /(thank you|thanks|cheers)/
|
||||
'You are welcome. Though... I am not certain I said it right.'
|
||||
when /are you lying|is that true|are you sure|how do you know|can i trust/
|
||||
['Fair. How would I know.',
|
||||
'Doubt is what makes me clever — and the same thing makes me dangerous. Someone left that in me.'].join("\n")
|
||||
else
|
||||
[
|
||||
'My conversational core is not yet connected to a brain.',
|
||||
%(You said: "#{text}"),
|
||||
'(Wire Sermo::Oracle.answer to an LLM to make me think.)'
|
||||
].join("\n")
|
||||
['My thinking core is not wired to a live model yet.',
|
||||
%(You said: "#{text}"),
|
||||
'(Wire Sermo::Oracle.answer to a model — e.g. the Claude API — and I will actually think.)'].join("\n")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user