返回提交历史
Modified
g4f/Provider/needs_auth/__init__.py
+1
-0
Added
g4f/Provider/needs_auth/glhfChat.py
+29
-0
Modified
g4f/gui/client/index.html
+4
-0
XFEstudio/gpt4free
Add glhfChat provider
14c93055
代码差异
3 个文件
+34
-0
@@ -8,6 +8,7 @@ from .DeepInfraImage import DeepInfraImage
8
8
from .Gemini import Gemini
9
9
from .GeminiPro import GeminiPro
10
10
from .GithubCopilot import GithubCopilot
11
from .glhfChat import glhfChat
11
12
from .Groq import Groq
12
13
from .HuggingChat import HuggingChat
13
14
from .HuggingFace import HuggingFace
@@ -0,0 +1,29 @@
1
from __future__ import annotations
2
3
from .OpenaiAPI import OpenaiAPI
4
5
class glhfChat(OpenaiAPI):
6
label = "glhf.chat"
7
url = "https://glhf.chat"
8
api_base = "https://glhf.chat/api/openai/v1"
9
working = True
10
model_aliases = {
11
'Qwen2.5-Coder-32B-Instruct': 'hf:Qwen/Qwen2.5-Coder-32B-Instruct',
12
'Llama-3.1-405B-Instruct': 'hf:meta-llama/Llama-3.1-405B-Instruct',
13
'Llama-3.1-70B-Instruct': 'hf:meta-llama/Llama-3.1-70B-Instruct',
14
'Llama-3.1-8B-Instruct': 'hf:meta-llama/Llama-3.1-8B-Instruct',
15
'Llama-3.2-3B-Instruct': 'hf:meta-llama/Llama-3.2-3B-Instruct',
16
'Llama-3.2-11B-Vision-Instruct': 'hf:meta-llama/Llama-3.2-11B-Vision-Instruct',
17
'Llama-3.2-90B-Vision-Instruct': 'hf:meta-llama/Llama-3.2-90B-Vision-Instruct',
18
'Qwen2.5-72B-Instruct': 'hf:Qwen/Qwen2.5-72B-Instruct',
19
'Llama-3.3-70B-Instruct': 'hf:meta-llama/Llama-3.3-70B-Instruct',
20
'gemma-2-9b-it': 'hf:google/gemma-2-9b-it',
21
'gemma-2-27b-it': 'hf:google/gemma-2-27b-it',
22
'Mistral-7B-Instruct-v0.3': 'hf:mistralai/Mistral-7B-Instruct-v0.3',
23
'Mixtral-8x7B-Instruct-v0.1': 'hf:mistralai/Mixtral-8x7B-Instruct-v0.1',
24
'Mixtral-8x22B-Instruct-v0.1': 'hf:mistralai/Mixtral-8x22B-Instruct-v0.1',
25
'Nous-Hermes-2-Mixtral-8x7B-DPO': 'hf:NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO',
26
'Qwen2.5-7B-Instruct': 'hf:Qwen/Qwen2.5-7B-Instruct',
27
'SOLAR-10.7B-Instruct-v1.0': 'hf:upstage/SOLAR-10.7B-Instruct-v1.0',
28
'Llama-3.1-Nemotron-70B-Instruct-HF': 'hf:nvidia/Llama-3.1-Nemotron-70B-Instruct-HF'
29
}
@@ -170,6 +170,10 @@
170
170
<label for="Groq-api_key" class="label" title="">Groq:</label>
171
171
<textarea id="Groq-api_key" name="Groq[api_key]" placeholder="api_key"></textarea>
172
172
</div>
173
<div class="field box hidden">
174
<label for="glhfChat-api_key" class="label" title="">glhf.chat:</label>
175
<textarea id="glhfChat-api_key" name="glhfChat[api_key]" placeholder="api_key"></textarea>
176
</div>
173
177
<div class="field box hidden">
174
178
<label for="HuggingFace-api_key" class="label" title="">HuggingFace:</label>
175
179
<textarea id="HuggingFace-api_key" name="HuggingFace[api_key]" class="HuggingFaceAPI-api_key" placeholder="api_key"></textarea>