This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Read JSON payload from stdin | |
| payload=$(cat) | |
| # Extract basic model information | |
| model=$(echo "$payload" | jq -r '.model.display_name // "N/A"') | |
| # Extract token usage data | |
| input=$(echo "$payload" | jq -r '.context_window.total_input_tokens // 0') |