Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/hugchat/hugchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ def get_remote_llms(self) -> list:


try:
models_data_list = json.loads(r.text)
models_data_list = json.loads(r.text)['json']
except json.JSONDecodeError as e:
logging.error(f"Error decoding JSON: {e}")
models_data_list = []
Expand Down Expand Up @@ -541,7 +541,7 @@ def get_conversation_info(self, conversation: Union[Conversation, str] = None) -

# you'll never understand the following codes until you try to debug huggingchat in person.
try:
data = r.json()
data = r.json()['json']
except json.JSONDecodeError as e:
logging.error(f"Failed to decode JSON: {e}")
return None
Expand Down