import os
from scale_gp import SGPClient
client = SGPClient(
api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
)
scalar_data = client.applications.metrics.scalar.retrieve(
metric_id="total_requests",
application_spec_id="application_spec_id",
)
print(scalar_data.value){
"value": 123,
"unit": "<string>"
}import os
from scale_gp import SGPClient
client = SGPClient(
api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
)
scalar_data = client.applications.metrics.scalar.retrieve(
metric_id="total_requests",
application_spec_id="application_spec_id",
)
print(scalar_data.value){
"value": 123,
"unit": "<string>"
}total_requests, total_errors, total_tokens, average_latency, p95_latency, error_rate, average_users, aggregated_tokens, feedback, execution_input_response_tokens, execution_average_latency_per_variant, execution_error_rate, execution_latency_percentile, execution_average_latency_per_node Which variants to filter on
Account ID used for authorization
The starting (oldest) timestamp window in seconds.
The ending (most recent) timestamp in seconds.