diff options
author | abc <98614666+xtekky@users.noreply.github.com> | 2023-08-27 17:37:44 +0200 |
---|---|---|
committer | abc <98614666+xtekky@users.noreply.github.com> | 2023-08-27 17:37:44 +0200 |
commit | efd75a11b871d61ac31b0e274acdfb33daba361d (patch) | |
tree | 22bd158324444cdbb9dbed46f25f8dffa60f3756 /g4f/Provider/Hugchat.py | |
parent | ~ | v-0.0.2.5 (diff) | |
download | gpt4free-efd75a11b871d61ac31b0e274acdfb33daba361d.tar gpt4free-efd75a11b871d61ac31b0e274acdfb33daba361d.tar.gz gpt4free-efd75a11b871d61ac31b0e274acdfb33daba361d.tar.bz2 gpt4free-efd75a11b871d61ac31b0e274acdfb33daba361d.tar.lz gpt4free-efd75a11b871d61ac31b0e274acdfb33daba361d.tar.xz gpt4free-efd75a11b871d61ac31b0e274acdfb33daba361d.tar.zst gpt4free-efd75a11b871d61ac31b0e274acdfb33daba361d.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/Provider/Hugchat.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/g4f/Provider/Hugchat.py b/g4f/Provider/Hugchat.py index cedf8402..80062af1 100644 --- a/g4f/Provider/Hugchat.py +++ b/g4f/Provider/Hugchat.py @@ -5,13 +5,13 @@ except ImportError: has_module = False from .base_provider import BaseProvider, get_cookies -from g4f.typing import CreateResult +from g4f.typing import CreateResult class Hugchat(BaseProvider): - url = "https://huggingface.co/chat/" + url = "https://huggingface.co/chat/" needs_auth = True - working = has_module - llms = ['OpenAssistant/oasst-sft-6-llama-30b-xor', 'meta-llama/Llama-2-70b-chat-hf'] + working = has_module + llms = ['OpenAssistant/oasst-sft-6-llama-30b-xor', 'meta-llama/Llama-2-70b-chat-hf'] @classmethod def create_completion( @@ -20,12 +20,10 @@ class Hugchat(BaseProvider): messages: list[dict[str, str]], stream: bool = False, proxy: str = None, - cookies: str = get_cookies(".huggingface.co"), - **kwargs - ) -> CreateResult: + cookies: str = get_cookies(".huggingface.co"), **kwargs) -> CreateResult: + bot = ChatBot( - cookies=cookies - ) + cookies=cookies) if proxy and "://" not in proxy: proxy = f"http://{proxy}" |