Some checks are pending
Check Python Version Consistency / Check Python Version (push) Waiting to run
19 lines
627 B
Bash
19 lines
627 B
Bash
#!/bin/bash
|
|
# CG3e — Opprett BigQuery-tabell llm_token_usage
|
|
# Kjøres én gang manuelt: bash scripts/create_llm_token_usage_table.sh
|
|
|
|
set -e
|
|
|
|
PROJECT="propane-will-491900-m5"
|
|
DATASET="billing_data"
|
|
TABLE="llm_token_usage"
|
|
|
|
echo "Oppretter BigQuery-tabell ${PROJECT}:${DATASET}.${TABLE} ..."
|
|
|
|
bq mk --table \
|
|
--description "Logg over all LLM token-bruk for CostGuard (CG3e)" \
|
|
"${PROJECT}:${DATASET}.${TABLE}" \
|
|
timestamp:TIMESTAMP,agent_name:STRING,model_name:STRING,input_tokens:INTEGER,output_tokens:INTEGER,total_tokens:INTEGER,estimated_cost_usd:FLOAT,request_id:STRING
|
|
|
|
echo "✅ Tabell ${FULL_TABLE} opprettet."
|