(ql:quickload '(:schizoph
:schizoph.foo-understander
:schizoph.bar-policy
:schizoph.baz-presenter))
(multiple-value-bind (think first-context next-context)
(make-bar-policy ...)
(defvar *first-context* first-context)
(defvar *persona*
(make-persona
:understand (make-foo-understander ...)
:think think
:next-context next-context
:represent (make-baz-representer ...))))
;; dialogue loop:
(loop
with context = (funcall *first-context*)
for text = (read-line)
for (bot-text next-context state) = (multiple-value-list (respond *persona* text context))
do (print bot-text)
(setf context next-context))
$ ros install carrotflakes/schizoph
- carrotflakes ([email protected])
Copyright (c) 2018 carrotflakes ([email protected])
Licensed under the LLGPL License.