From f02162d8ae0c80e4615c455e2e94009c2a7809a2 Mon Sep 17 00:00:00 2001 From: Moritz Date: Mon, 23 Oct 2023 17:47:30 +0200 Subject: [PATCH] print last message abra cmd --- abra.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/abra.sh b/abra.sh index b280133..fa8e047 100644 --- a/abra.sh +++ b/abra.sh @@ -1 +1,12 @@ export CONFIG_VERSION=v1 + +message() { + python3 -c """ +import json +import os +lastfile = sorted(os.listdir('/root/.config/chatgpt-cli/session-history/'))[-1] +message = json.load(open(f'/root/.config/chatgpt-cli/session-history/{lastfile}')) +print(message['messages'][-1]['content']) + """ + +}