diff options
author | H Lohaus <hlohaus@users.noreply.github.com> | 2024-01-02 01:10:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-02 01:10:31 +0100 |
commit | b1b8ed40a4e8c7c3490b1c6b7cf6b55d0776f366 (patch) | |
tree | 6cd09fb2eb4c144e28a82759a2a9a2fa7f30d311 /g4f/Provider/needs_auth/HuggingChat.py | |
parent | Merge pull request #1414 from hlohaus/lia (diff) | |
parent | Fix markdown replace (diff) | |
download | gpt4free-b1b8ed40a4e8c7c3490b1c6b7cf6b55d0776f366.tar gpt4free-b1b8ed40a4e8c7c3490b1c6b7cf6b55d0776f366.tar.gz gpt4free-b1b8ed40a4e8c7c3490b1c6b7cf6b55d0776f366.tar.bz2 gpt4free-b1b8ed40a4e8c7c3490b1c6b7cf6b55d0776f366.tar.lz gpt4free-b1b8ed40a4e8c7c3490b1c6b7cf6b55d0776f366.tar.xz gpt4free-b1b8ed40a4e8c7c3490b1c6b7cf6b55d0776f366.tar.zst gpt4free-b1b8ed40a4e8c7c3490b1c6b7cf6b55d0776f366.zip |
Diffstat (limited to 'g4f/Provider/needs_auth/HuggingChat.py')
-rw-r--r-- | g4f/Provider/needs_auth/HuggingChat.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/g4f/Provider/needs_auth/HuggingChat.py b/g4f/Provider/needs_auth/HuggingChat.py index 41c938b4..e4fa237d 100644 --- a/g4f/Provider/needs_auth/HuggingChat.py +++ b/g4f/Provider/needs_auth/HuggingChat.py @@ -8,6 +8,9 @@ from ...typing import AsyncResult, Messages from ..base_provider import AsyncGeneratorProvider from ..helper import format_prompt, get_cookies +map = { + "openchat/openchat_3.5": "openchat/openchat-3.5-1210", +} class HuggingChat(AsyncGeneratorProvider): url = "https://huggingface.co/chat" @@ -25,7 +28,10 @@ class HuggingChat(AsyncGeneratorProvider): cookies: dict = None, **kwargs ) -> AsyncResult: - model = model if model else cls.model + if not model: + model = cls.model + elif model in map: + model = map[model] if not cookies: cookies = get_cookies(".huggingface.co") |