diff options
| author | Hsieh Chin Fan <pham@topo.tw> | 2023-04-02 23:10:35 +0800 |
|---|---|---|
| committer | Hsieh Chin Fan <pham@topo.tw> | 2023-04-02 23:10:35 +0800 |
| commit | 6b5fb700317a8521e02eb88b1e58a436d7068e9a (patch) | |
| tree | 26ac62d41ce07d3393c21f3bfd3a2ab30887cfaa | |
| parent | cf3ff649ebf9884814c80e6cae62d163a7427a03 (diff) | |
Update
| -rwxr-xr-x | bin/gpt/gpt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/gpt/gpt b/bin/gpt/gpt index aa770bb..4288851 100755 --- a/bin/gpt/gpt +++ b/bin/gpt/gpt | |||
| @@ -338,6 +338,7 @@ EOF | |||
| 338 | _API_call | _process_completion | 338 | _API_call | _process_completion |
| 339 | echo -e '\e[0m\n' | 339 | echo -e '\e[0m\n' |
| 340 | 340 | ||
| 341 | # Print token use for each chat (if --verbose is set) | ||
| 341 | if [ "$VERBOSE" = true ]; then | 342 | if [ "$VERBOSE" = true ]; then |
| 342 | tokens=$(jq -s '.[-1].usage? // empty | .total_tokens' "$cache") | 343 | tokens=$(jq -s '.[-1].usage? // empty | .total_tokens' "$cache") |
| 343 | echo -e "$tokens token used.\n" | 344 | echo -e "$tokens token used.\n" |