mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
(fix) tg ai raise errors on non 200 responses
This commit is contained in:
parent
c3ef014ee5
commit
ad26dd8946
1 changed files with 4 additions and 0 deletions
|
@ -154,6 +154,10 @@ def completion(
|
|||
)
|
||||
print_verbose(f"raw model_response: {response.text}")
|
||||
## RESPONSE OBJECT
|
||||
if response.status_code != 200:
|
||||
raise TogetherAIError(
|
||||
status_code=response.status_code, message=response.text
|
||||
)
|
||||
completion_response = response.json()
|
||||
|
||||
if "error" in completion_response:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue