Janky, but colors.
This commit is contained in:
parent
f2987fd85e
commit
f5582d0f42
3
ai-chat
3
ai-chat
@ -7,6 +7,7 @@ prompt="You are Mr.Helper. You are an assistant that lives in a floating termina
|
||||
|
||||
echo -n "$prompt" | jq -sR '{"role": "system", "content": .}' > "$conversation_file"
|
||||
|
||||
printf '\033[48;5;241m\033[38;5;15m'
|
||||
while read -rep '> ' prompt ; do
|
||||
[ -n "$prompt" ] || continue
|
||||
|
||||
@ -24,5 +25,7 @@ while read -rep '> ' prompt ; do
|
||||
)"
|
||||
reply=$(echo "$out" | jq -rc .choices[0].message)
|
||||
echo "$reply" >> "$conversation_file"
|
||||
printf '\033[48;5;235m\033[38;5;15m'
|
||||
echo "$reply" | jq -rc .content
|
||||
printf '\033[48;5;241m\033[38;5;15m'
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user