XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

refactor(g4f/Provider/Blackbox.py): update model names and adjust payload

1e859b68
kqlio67 <kqlio67@users.noreply.github.com>
提交于

代码差异

1 个文件 +13 -17
Modified g4f/Provider/Blackbox.py +13 -17
@@ -23,20 +23,11 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin):
23 23 'gemini-1.5-flash',
24 24 "llama-3.1-8b",
25 25 'llama-3.1-70b',
26 'llama-3.1-405b',
27 26 'ImageGenerationLV45LJp',
28 'GPT-4o',
29 'Gemini-PRO',
30 'Claude-Sonnet-3.5',
27 'gpt-4o',
28 'gemini-pro',
29 'claude-sonnet-3.5',
31 30 ]
32
33 model_aliases = {
34 "gemini-flash": "gemini-1.5-flash",
35 "flux": "ImageGenerationLV45LJp",
36 "gpt-4o": "GPT-4o",
37 "gemini-pro": "Gemini-PRO",
38 "claude-3.5-sonnet": "Claude-Sonnet-3.5",
39 }
40 31
41 32 agentMode = {
42 33 'ImageGenerationLV45LJp': {'mode': True, 'id': "ImageGenerationLV45LJp", 'name': "Image Generation"},
@@ -47,13 +38,17 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin):
47 38 "gemini-1.5-flash": {'mode': True, 'id': 'Gemini'},
48 39 "llama-3.1-8b": {'mode': True, 'id': "llama-3.1-8b"},
49 40 'llama-3.1-70b': {'mode': True, 'id': "llama-3.1-70b"},
50 'llama-3.1-405b': {'mode': True, 'id': "llama-3.1-405b"},
51 41 }
52 42
53 43 userSelectedModel = {
54 "GPT-4o": "GPT-4o",
55 "Gemini-PRO": "Gemini-PRO",
56 'Claude-Sonnet-3.5': "Claude-Sonnet-3.5",
44 "gpt-4o": "gpt-4o",
45 "gemini-pro": "gemini-pro",
46 'claude-sonnet-3.5': "claude-sonnet-3.5",
47 }
48
49 model_aliases = {
50 "gemini-flash": "gemini-1.5-flash",
51 "flux": "ImageGenerationLV45LJp",
57 52 }
58 53
59 54 @classmethod
@@ -119,8 +114,9 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin):
119 114 "agentMode": {},
120 115 "trendingAgentMode": {},
121 116 "userSelectedModel": None,
117 "userSystemPrompt": None,
122 118 "isMicMode": False,
123 "maxTokens": 99999999,
119 "maxTokens": 1024,
124 120 "playgroundTopP": 0.9,
125 121 "playgroundTemperature": 0.5,
126 122 "isChromeExt": False,