diff --git a/provider/huggingchat.py b/provider/huggingchat.py index cebb5c1bb798..00b3ca9d3726 100644 --- a/provider/huggingchat.py +++ b/provider/huggingchat.py @@ -38,8 +38,10 @@ def instruct(self, prompt: str) -> str: }, stream=True, ) - - assert res.status_code == 200, "Failed to send message" + if res.status_code != 200: + print(f"Status code: {res.status_code}") + print(f"Response content: {res.content}") + raise Exception("Failed to send prompt to AI") last_response = None for chunk in res.iter_content(chunk_size=None):