diff options
author | icebaker <icebaker@proton.me> | 2023-05-21 21:27:05 -0300 |
---|---|---|
committer | icebaker <icebaker@proton.me> | 2023-05-21 21:27:05 -0300 |
commit | 084923fe46390b3f38350650574503d71d42cc89 (patch) | |
tree | cf44f9feb7cf9a13bf48216055a21197630c30c6 | |
parent | e0864ca05206f2d2512f29bd8b14fd20816361f4 (diff) |
updating readme
-rw-r--r-- | README.md | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -193,8 +193,21 @@ NanoBot.repl(cartridge: 'cartridge.yml') # Starts a new REPL. bot = NanoBot.new(cartridge: 'cartridge.yml') +bot = NanoBot.new( + cartridge: YAML.safe_load(File.read('cartridge.yml'), permitted_classes: [Symbol]) +) + +bot = NanoBot.new( + cartridge: { ... } # Parsed Cartridge Hash +) + bot.eval('Hello') +# When stream is enabled and available: +bot.eval('Hi!') do |content, fragment, finished| + print fragment unless fragment.nil? +end + bot.repl # Starts a new REPL. NanoBot.repl(cartridge: 'cartridge.yml', state: '6ea6c43c42a1c076b1e3c36fa349ac2c') |