black formatting

This commit is contained in:
Adil Hafeez 2026-04-17 01:02:12 -07:00
parent d30018cf35
commit d09fa97568
5 changed files with 52 additions and 13 deletions

View file

@ -15,7 +15,6 @@ from opentelemetry.proto.collector.trace.v1 import (
trace_service_pb2_grpc,
)
DEFAULT_GRPC_PORT = 4317
DEFAULT_CAPACITY = 1000
@ -198,9 +197,9 @@ def span_to_llm_call(
route_name=(
str(attrs[_PLANO_ROUTE_NAME]) if _PLANO_ROUTE_NAME in attrs else None
),
is_streaming=bool(attrs[_LLM_IS_STREAMING])
if _LLM_IS_STREAMING in attrs
else None,
is_streaming=(
bool(attrs[_LLM_IS_STREAMING]) if _LLM_IS_STREAMING in attrs else None
),
status_code=_maybe_int(attrs.get(_HTTP_STATUS)),
prompt_tokens=_maybe_int(attrs.get(_LLM_PROMPT_TOKENS)),
completion_tokens=_maybe_int(attrs.get(_LLM_COMPLETION_TOKENS)),

View file

@ -13,7 +13,6 @@ from typing import Any
import requests
DEFAULT_PRICING_URL = "https://api.digitalocean.com/v2/gen-ai/models/catalog"
FETCH_TIMEOUT_SECS = 5.0

View file

@ -271,7 +271,11 @@ def _recent_table(calls: list[LLMCall], limit: int = 15) -> Table:
recent = list(reversed(calls))[:limit]
for c in recent:
status_cell = "ok" if c.status_code and 200 <= c.status_code < 400 else str(c.status_code or "")
status_cell = (
"ok"
if c.status_code and 200 <= c.status_code < 400
else str(c.status_code or "")
)
row = [
c.timestamp.strftime("%H:%M:%S"),
c.model,