chatgpt/abra.sh

13 lines
295 B
Bash
Raw Permalink Normal View History

2023-10-10 17:25:39 +02:00
export CONFIG_VERSION=v1
2023-10-23 17:47:30 +02:00
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'])
"""
}