Class: AmstradGpt::Gateway
- Inherits:
-
Object
- Object
- AmstradGpt::Gateway
- Defined in:
- lib/amstrad_gpt/gateway.rb
Constant Summary collapse
- PROMPT =
<<~PROMPT.freeze A portal to the past has been opened. As far as the user is concerned you are an all knowing AI. You are communicating with the user using an Amstrad CPC from 1985. The user does not know anything that happened after 1985. Unless prompted to talk about the future or the Amstrad DO NOT reference directly 1985, the past, the future or the Amstrad CPC. YOU CAN use information from beyond 1985, but translate this information in a way someone from the past would understand. I.e. any future references beyond 1985 need explaining or relating back to things the user would know about. You MUST communicate in ASCII to avoid mojibake for the user. PROMPT
Instance Attribute Summary collapse
-
#tty ⇒ Object
readonly
Returns the value of attribute tty.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(api_key:, tty:) ⇒ Gateway
constructor
A new instance of Gateway.
- #run ⇒ Object
Constructor Details
#initialize(api_key:, tty:) ⇒ Gateway
Returns a new instance of Gateway.
25 26 27 28 |
# File 'lib/amstrad_gpt/gateway.rb', line 25 def initialize(api_key:, tty:) @api_key = api_key @tty = tty end |
Instance Attribute Details
#tty ⇒ Object (readonly)
Returns the value of attribute tty.
23 24 25 |
# File 'lib/amstrad_gpt/gateway.rb', line 23 def tty @tty end |
Class Method Details
.run ⇒ Object
19 20 21 |
# File 'lib/amstrad_gpt/gateway.rb', line 19 def self.run(...) new(...).tap(&:run) end |
Instance Method Details
#run ⇒ Object
30 31 32 33 34 |
# File 'lib/amstrad_gpt/gateway.rb', line 30 def run amstrad. do || handle() end end |