fix(g4f/Provider/HuggingChat.py): update conversation data request parameter

This commit is contained in:
kqlio67 2024-11-11 21:18:12 +02:00
parent 19af1654cd
commit 254228707b

View File

@ -83,7 +83,7 @@ class HuggingChat(AbstractProvider, ProviderModelMixin):
raise RuntimeError(f"Request failed with status code: {response.status_code}, response: {response.text}")
conversationId = response.json().get('conversationId')
response = session.get(f'https://huggingface.co/chat/conversation/{conversationId}/__data.json?x-sveltekit-invalidated=11')
response = session.get(f'https://huggingface.co/chat/conversation/{conversationId}/__data.json?x-sveltekit-invalidated=01')
data: list = response.json()["nodes"][1]["data"]
keys: list[int] = data[data[0]["messages"]]