-init py-

This commit is contained in:
mike
2025-12-11 12:34:09 +01:00
parent f906e6666a
commit 91d4592272
3 changed files with 305 additions and 0 deletions

View File

@@ -253,6 +253,7 @@ log_request() {
created=$(echo "$response_body" | jq -r ".created // $created")
api_cost=$(echo "$prompt_tokens_int * $ACSH_API_PROMPT_COST + $completion_tokens_int * $ACSH_API_COMPLETION_COST" | bc)
log_file=${ACSH_LOG_FILE:-"$HOME/.finish/finish.log"}
mkdir -p "$(dirname "$log_file")" 2>/dev/null
echo "$created,$user_input_hash,$prompt_tokens_int,$completion_tokens_int,$api_cost" >> "$log_file"
}