Last active
February 3, 2026 02:48
-
-
Save patham9/9e960643d3f39c8e669f7dde02afa193 to your computer and use it in GitHub Desktop.
Persistent atomspace of (capital country) incrementally grown by local VLM (runnable with PeTTa v1.0.x)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| !(import! &self (library lib_spaces)) | |
| !(import! &self (library lib_import)) | |
| !(git-import! "https://github.com/patham9/petta_lib_localvlm.git") | |
| !(import_prolog_functions_from_file (library lib_localvlm.pl) (vlm_query vlm_embed)) | |
| !(git-import! "https://github.com/patham9/petta_lib_snapshot.git") | |
| !(import! &self (library lib_snapshot)) | |
| (= (forever) | |
| (progn (case (catch (sread (vlm_query "http://192.168.1.129:2276" | |
| "give me 5 capitals, format is strict S-Expression, output nothing else: ((capital1 country1) ... (cityn countryn))" | |
| 300))) ;max output tokens | |
| (((Error $A $B) alsofine) | |
| ($z (collapse (let $capital_country (superpose $z) | |
| (if (not (find &cities $capital_country)) | |
| (add-atom &cities $capital_country))))))) | |
| (println! (collapse (get-atoms &cities))) | |
| (Snapshot) | |
| (forever))) | |
| !(CallWithSnapshotInterval (forever) 1) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example: