Created
May 20, 2025 09:06
-
-
Save patham9/b89ef4b8d7d40782766889b833ac5495 to your computer and use it in GitHub Desktop.
MeTTa Motto (rel extraction test)
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 motto) | |
!(let $x ((chat-gpt-agent "gpt-4o-mini") | |
(system "You are an assistant. Answer as a tuple (R a b) (no commas) where R in {near} and a,b in {human, robot, chair}") | |
(user "the robot is close to the chair!")) | |
(let $L ((py-dot ((py-dot ((py-dot $x replace) "(" "" ) replace) ")" "") split) " ") | |
(let ($R $a $b) | |
(((py-dot $L __getitem__) 0) | |
((py-dot $L __getitem__) 1) | |
((py-dot $L __getitem__) 2)) | |
(EXTRACTED: (R = $R) (a = $a) (b = $b))))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment