print last message abra cmd

This commit is contained in:
Moritz 2023-10-23 17:47:30 +02:00
parent 150f1665ae
commit f02162d8ae
1 changed files with 11 additions and 0 deletions

11
abra.sh
View File

@ -1 +1,12 @@
export CONFIG_VERSION=v1 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'])
"""
}