mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
rollback file
This commit is contained in:
parent
151c76a35f
commit
25085266af
1 changed files with 7 additions and 0 deletions
|
|
@ -144,6 +144,13 @@ class VertexAIPartnerModelsTokenCounter(VertexBase):
|
|||
timeout=30.0,
|
||||
)
|
||||
|
||||
# Check for errors
|
||||
if response.status_code != 200:
|
||||
error_text = response.text
|
||||
raise ValueError(
|
||||
f"Token counting request failed with status {response.status_code}: {error_text}"
|
||||
)
|
||||
|
||||
# Parse response
|
||||
result = response.json()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue