summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/HuggingFace.py
diff options
context:
space:
mode:
authorTekky <98614666+xtekky@users.noreply.github.com>2024-07-11 20:03:13 +0200
committerGitHub <noreply@github.com>2024-07-11 20:03:13 +0200
commit31edda55f75b85651998bc0a77f22e538accaa1f (patch)
treecfb769c3569449780c9edc5073eb47180e60655d /g4f/Provider/HuggingFace.py
parentMerge pull request #2097 from gamelist1990/main (diff)
parentUpdate g4f/models.py (diff)
downloadgpt4free-0.3.2.2.tar
gpt4free-0.3.2.2.tar.gz
gpt4free-0.3.2.2.tar.bz2
gpt4free-0.3.2.2.tar.lz
gpt4free-0.3.2.2.tar.xz
gpt4free-0.3.2.2.tar.zst
gpt4free-0.3.2.2.zip
Diffstat (limited to 'g4f/Provider/HuggingFace.py')
-rw-r--r--g4f/Provider/HuggingFace.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/g4f/Provider/HuggingFace.py b/g4f/Provider/HuggingFace.py
index 6a05c26e..a5e27ccf 100644
--- a/g4f/Provider/HuggingFace.py
+++ b/g4f/Provider/HuggingFace.py
@@ -12,10 +12,16 @@ from ..requests.raise_for_status import raise_for_status
class HuggingFace(AsyncGeneratorProvider, ProviderModelMixin):
url = "https://huggingface.co/chat"
working = True
+ needs_auth = True
supports_message_history = True
models = [
- "mistralai/Mixtral-8x7B-Instruct-v0.1",
- "mistralai/Mistral-7B-Instruct-v0.2"
+ 'CohereForAI/c4ai-command-r-plus',
+ 'meta-llama/Meta-Llama-3-70B-Instruct',
+ 'mistralai/Mixtral-8x7B-Instruct-v0.1',
+ 'NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO',
+ '01-ai/Yi-1.5-34B-Chat',
+ 'mistralai/Mistral-7B-Instruct-v0.2',
+ 'microsoft/Phi-3-mini-4k-instruct',
]
default_model = "mistralai/Mixtral-8x7B-Instruct-v0.1"
@@ -74,4 +80,4 @@ def format_prompt(messages: Messages) -> str:
for idx, message in enumerate(messages)
if message["role"] == "assistant"
])
- return f"{history}<s>[INST] {question} [/INST]" \ No newline at end of file
+ return f"{history}<s>[INST] {question} [/INST]"