Skip to content

Commit c410c9a

Browse files
committed
Fix small bugs
1 parent 9575200 commit c410c9a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ async def _fetch_details(self, generation_id: str) -> dict[str, Any]:
6565
return response.json()
6666
except httpx.HTTPError:
6767
await asyncio.sleep(0.5)
68-
return {"data": {"total_cost": 0.0, "cache_discount": 0.0}}
68+
return {"data": {"upstream_inference_cost": 0.0, "cache_discount": 0.0}}

src/chat_completion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def completion_tokens(self) -> int:
2020

2121
@property
2222
def cache_discount_string(self) -> str:
23-
if not self._cache_discount:
23+
if self._cache_discount is None:
2424
return "N/A"
2525

2626
sign = "-" if self._cache_discount < 0 else ""

0 commit comments

Comments
 (0)