{"version":2,"name":"MTL Mes Actions","disableSend":false,"placeBeforeInput":false,"injectInput":false,"color":"rgba(0, 0, 0, 0)","onlyBorderColor":false,"qrList":[{"id":4,"icon":"fa-book-open-reader","showLabel":false,"label":"Chat-Pair RAG","title":"","message":"/message-get {{mes::id}} |\n/= pipe.is_user |\n/let isuser {{pipe}} |\n\n/if left={{var::isuser}} else={:\n\t/abort quiet=false QR must be used on a user role message. Aborting. |\n:}\n{:\n\t/if left={{mes::id}} right={{lastmessageid}} rule=eq {:\n\t\t/abort quiet=false No message pair. Aborting. |\n\t:}|\n:}|\n\n\n/add {{mes::id}} 1 |\n/let engid {{pipe}} |\n\n/message-get {{var::engid}} |\n/= pipe.is_user |\n/let isassist {{pipe}} |\n\n/if left=isassist {:\n\t/abort quiet=false Improper pair. Aborting. |\n:}|\n\n/message-get {{mes::id}} |\n/= pipe.name |\n/let name_user {{pipe}} |\n\n/message-get {{var::engid}} |\n/= pipe.name |\n/let name_assist {{pipe}} |\n\n\n/messages names=on {{mes::id}}-{{var::engid}} |\n\n/let mesGrab {{pipe}} |\n\n/re-replace find=\"/{{var::name_user}}: /\" replace=\"<\\|start_header_id\\|>Japanese<\\|end_header_id\\|>{{newline}}{{newline}}\" {{var::mesGrab}} |\n/re-replace find=\"/\\n\\n{{var::name_assist}}: /\" replace=\"<\\|eot_id\\|><\\|start_header_id\\|>English<\\|end_header_id\\|>{{newline}}{{newline}}\" {{pipe}} |\n\n/let mesInst \"{{pipe}}<\\|eot_id\\|>\" |\n\n/let entName \"\" |\n/input rows=1 Write data-back entry name(Recommended to use the name of the character speaking) |\n\n/if left=\"{{pipe}}\" right=\"\" rule=eq else={:\n\t/var key=entName as=string \"{{pipe}}\" |\n:}\n{:\n\t/var key=entName as=string \"Translation-Snip\" |\n:}|\n\n\n/databank-add name=\"{{var::entName}}_{{mes::id}}-{{var::engid}}\" \"{{var::mesInst}}\" |","contextList":[],"preventAutoExecute":true,"isHidden":false,"executeOnStartup":false,"executeOnUser":false,"executeOnAi":false,"executeOnChatChange":false,"executeOnGroupMemberDraft":false,"executeOnNewChat":false,"automationId":""}],"idIndex":6}