feat(cloud): attribute planner token usage
This commit is contained in:
@@ -240,6 +240,18 @@ class CloudClient:
|
||||
"PUT", f"/hosts/{host_id}/governance-policy", json=policy
|
||||
).json()
|
||||
|
||||
def get_host_token_usage(self, host_id: str) -> dict[str, Any]:
|
||||
return self._request("GET", f"/hosts/{host_id}/token-usage").json()
|
||||
|
||||
def list_host_token_usage_events(
|
||||
self, host_id: str, *, limit: int = 50, offset: int = 0
|
||||
) -> list[dict[str, Any]]:
|
||||
return self._request(
|
||||
"GET",
|
||||
f"/hosts/{host_id}/token-usage-events",
|
||||
params={"limit": limit, "offset": offset},
|
||||
).json()
|
||||
|
||||
# ------------------------------------------------------------------ helpers
|
||||
|
||||
def _url(self, path: str) -> str:
|
||||
|
||||
Reference in New Issue
Block a user