Files
passepartout/test_llm_final.lisp
Amr Gharbeia c70f182888
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 3s
FEAT: Stabilize Unified Envelope Architecture & TUI UX
- Fixed background boot crash via --non-interactive flag.
- Implemented robust protocol sanitization (stripped raw streams).
- Refined TUI formatting to display human-readable tool results.
- Fixed opencortex.sh variable shadowing and connection logic.
- Resolved :target field schema validation errors.
2026-04-20 18:19:54 -04:00

28 lines
1.1 KiB
Common Lisp

(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))
(push (truename "./") asdf:*central-registry*)
(ql:quickload :opencortex)
;; Manually load .env for testing
(with-open-file (in ".env" :if-does-not-exist nil)
(when in
(loop for line = (read-line in nil) while line do
(let ((pos (position #\= line)))
(when pos
(let ((key (string-trim " \"" (subseq line 0 pos)))
(val (string-trim " \"" (subseq line (1+ pos)))))
(sb-posix:putenv (format nil "~a=~a" key val))))))))
(opencortex:initialize-all-skills)
(format t "~%--- PROBING OPENROUTER ---~%")
;; Inject it directly into the vault memory to be sure
(let ((key (uiop:getenv "OPENROUTER_API_KEY")))
(when key
(setf (gethash "OPENROUTER-API-KEY" opencortex::*vault-memory*) key)))
(let ((res (opencortex:ask-probabilistic "Say Cognitive Loop Active" :cascade (list :openrouter))))
(format t "~%--- PROBE RESULT ---~%~s~%--------------------~%" res)
(if (and (stringp res) (search "Active" res))
(uiop:quit 0)
(uiop:quit 1)))