Skip to content

Fix login and answer#289

Merged
Soulter merged 1 commit into
Soulter:masterfrom
Zotic:master
Jun 12, 2025
Merged

Fix login and answer#289
Soulter merged 1 commit into
Soulter:masterfrom
Zotic:master

Conversation

@Zotic
Copy link
Copy Markdown
Contributor

@Zotic Zotic commented Jun 11, 2025

Fix login and answer

fix login and answer
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thanks for your PR, we will deal with your PR as soon as possible.🤗

@Zotic
Copy link
Copy Markdown
Contributor Author

Zotic commented Jun 11, 2025

When logging in, the models are loaded and an error appears:

File "c:\Users\zotic\Desktop\ZXApps\Telegram\Galactic_Soraka1.py", line 71, in __init__ self.chatbot = hugchat.ChatBot(cookies=cookies.get_dict()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zotic\AppData\Local\Programs\Python\Python312\Lib\site-packages\hugchat\hugchat.py", line 75, in __init__ self.llms = self.get_remote_llms() ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\zotic\AppData\Local\Programs\Python\Python312\Lib\site-packages\hugchat\hugchat.py", line 425, in get_remote_llms if model_data_dict.get("unlisted", False): # Default to False if 'unlisted' key is missing

This happens because the response now has a new structure:

11.06.2025 18:33:57 - root - DEBUG - {'json': [{'id': 'meta-llama/Llama-3.3-70B-Instruct', 'name': 'meta-llama/Llama-3.3-70B-Instruct', 'websiteUrl': 'https://llama.meta.com/', 'modelUrl': 'https://huggingface.co/meta-llama/Llama-3.3-70B-Instruct'...

Therefore, a new access to data is necessary. Similarly for messages.

@Zotic Zotic changed the title Update hugchat.py Fix login and answer Jun 11, 2025
Copy link
Copy Markdown

@uroosadys292 uroosadys292 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes this is the right code, I have also monkey patched it

@Soulter Soulter merged commit 0d03de6 into Soulter:master Jun 12, 2025
1 check passed
@Soulter
Copy link
Copy Markdown
Owner

Soulter commented Jun 12, 2025

Thanks❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants