返回提交历史
Modified
docs/providers-and-models.md
+9
-3
Modified
g4f/Provider/Airforce.py
+32
-218
Added
g4f/Provider/airforce/AirforceChat.py
+375
-0
Added
g4f/Provider/airforce/AirforceImage.py
+97
-0
Added
g4f/Provider/airforce/__init__.py
+2
-0
Modified
g4f/models.py
+132
-107
XFEstudio/gpt4free
Update (g4f/Provider/Airforce.py)
11bec81d
代码差异
6 个文件
+647
-328
@@ -16,12 +16,12 @@ This document provides an overview of various AI providers and models, including
16
16
| Provider | Text Models | Image Models | Vision Models | Stream | Status | Auth |
17
17
|----------|-------------|--------------|---------------|--------|--------|------|
18
18
|[ai4chat.co](https://www.ai4chat.co)|`g4f.Provider.Ai4Chat`|`gpt-4`|❌|❌|✔||❌|
19
|[chat.ai365vip.com](https://chat.ai365vip.com)|`g4f.Provider.AI365VIP`|`gpt-3.5-turbo, gpt-4o`|❌|❌|?||❌|
19
|[chat.ai365vip.com](https://chat.ai365vip.com)|`g4f.Provider.AI365VIP`|✔|❌|❌|?||❌|
20
20
|[aichatfree.info](https://aichatfree.info)|`g4f.Provider.AIChatFree`|`gemini-pro`|❌|❌|✔||❌|
21
21
|[aichatonline.org](https://aichatonline.org)|`g4f.Provider.AiChatOnline`|`gpt-4o-mini`|❌|❌|?||❌|
22
22
|[ai-chats.org](https://ai-chats.org)|`g4f.Provider.AiChats`|`gpt-4`|`dalle`|❌|?||❌|
23
23
|[api.airforce](https://api.airforce)|`g4f.Provider.AiMathGPT`|`llama-3.1-70b`|❌|❌|✔||❌|
24
|[api.airforce](https://api.airforce)|`g4f.Provider.Airforce`|`gpt-4, gpt-4-turbo, gpt-4o-mini, gpt-3.5-turbo, gpt-4o, claude-3-haiku, claude-3-sonnet, claude-3-5-sonnet, claude-3-opus, llama-3-70b, llama-3-8b, llama-2-13b, llama-3.1-405b, llama-3.1-70b, llama-3.1-8b, llamaguard-2-8b, llamaguard-7b, llama-3.2-90b, mixtral-8x7b mixtral-8x22b, mistral-7b, qwen-1.5-7b, qwen-1.5-14b, qwen-1.5-72b, qwen-1.5-110b, qwen-2-72b, gemma-2b, gemma-2-9b, gemma-2-27b, gemini-flash, gemini-pro, deepseek, mixtral-8x7b-dpo, yi-34b, wizardlm-2-8x22b, solar-10.7b, mythomax-l2-13b, cosmosrp`|`flux, flux-realism', flux-anime, flux-3d, flux-disney, flux-pixel, flux-4o, any-dark, dalle-3`|❌|✔||❌|
24
|[api.airforce](https://api.airforce)|`g4f.Provider.Airforce`|`claude-3-haiku, claude-3-sonnet, claude-3-opus, gpt-4, gpt-4-turbo, gpt-4o-mini, gpt-3.5-turbo, llama-3-70b, llama-3-8b, llama-2-13b, llama-3.1-405b, llama-3.1-70b, llama-3.1-8b, llamaguard-2-8b, llamaguard-7b, llama-3.2-90b, llamaguard-3-8b, llama-3.2-11b, llamaguard-3-11b, llama-3.2-3b, llama-3.2-1b, llama-2-7b, mixtral-8x7b, mixtral-8x22b, mythomax-13b, openchat-3.5, qwen-2-72b, qwen-2-5-7b, qwen-2-5-72b, gemma-2b, gemma-2-9b, gemma-2b-27b, gemini-flash, gemini-pro, dbrx-instruct, deepseek-coder, hermes-2-dpo, hermes-2, openhermes-2.5, wizardlm-2-8x22b, phi-2, solar-10-7b, cosmosrp, lfm-40b, german-7b, zephyr-7b`|`flux, flux-realism', flux-anime, flux-3d, flux-disney, flux-pixel, flux-4o, any-dark, dalle-3`|❌|✔||❌|
25
25
|[aiuncensored.info](https://www.aiuncensored.info)|`g4f.Provider.AIUncensored`|✔|✔|❌|✔||❌|
26
26
|[allyfy.chat](https://allyfy.chat/)|`g4f.Provider.Allyfy`|`gpt-3.5-turbo`|❌|❌|✔||❌|
27
27
|[amigochat.io/chat](https://amigochat.io/chat/)|`g4f.Provider.AmigoChat`|`gpt-4o, gpt-4o-mini, o1, o1-mini, claude-3.5-sonnet, llama-3.2-90b, llama-3.1-405b, gemini-pro`|`flux-pro, flux-realism, dalle-3`|❌|✔||❌|
@@ -131,6 +131,8 @@ This document provides an overview of various AI providers and models, including
131
131
|mistral-nemo|Mistral AI|2+ Providers|[huggingface.co](https://huggingface.co/mistralai/Mistral-Nemo-Instruct-2407)|
132
132
|mistral-large|Mistral AI|2+ Providers|[mistral.ai](https://mistral.ai/news/mistral-large-2407/)|
133
133
|mixtral-8x7b-dpo|NousResearch|1+ Providers|[huggingface.co](https://huggingface.co/NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO)|
134
|hermes-2-dpo|NousResearch|1+ Providers|[huggingface.co](https://huggingface.co/NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO)|
135
|hermes-2|NousResearch|1+ Providers|[huggingface.co](https://huggingface.co/NousResearch/Hermes-2-Pro-Mistral-7B)|
134
136
|yi-34b|NousResearch|1+ Providers|[huggingface.co](https://huggingface.co/NousResearch/Nous-Hermes-2-Yi-34B)|
135
137
|hermes-3|NousResearch|2+ Providers|[huggingface.co](https://huggingface.co/NousResearch/Hermes-3-Llama-3.1-8B)|
136
138
|gemini|Google DeepMind|1+ Providers|[deepmind.google](http://deepmind.google/technologies/gemini/)|
@@ -170,7 +172,7 @@ This document provides an overview of various AI providers and models, including
170
172
|solar-10-7b|Upstage|1+ Providers|[huggingface.co](https://huggingface.co/upstage/SOLAR-10.7B-Instruct-v1.0)|
171
173
|solar-pro|Upstage|1+ Providers|[huggingface.co](https://huggingface.co/upstage/solar-pro-preview-instruct)|
172
174
|pi|Inflection|1+ Providers|[inflection.ai](https://inflection.ai/blog/inflection-2-5)|
173
|deepseek|DeepSeek|1+ Providers|[deepseek.com](https://www.deepseek.com/)|
175
|deepseek-coder|DeepSeek|1+ Providers|[huggingface.co](https://huggingface.co/deepseek-ai/DeepSeek-Coder-V2-Instruct)|
174
176
|wizardlm-2-7b|WizardLM|1+ Providers|[huggingface.co](https://huggingface.co/dreamgen/WizardLM-2-7B)|
175
177
|wizardlm-2-8x22b|WizardLM|2+ Providers|[huggingface.co](https://huggingface.co/alpindale/WizardLM-2-8x22B)|
176
178
|sh-n-7b|Together|1+ Providers|[huggingface.co](https://huggingface.co/togethercomputer/StripedHyena-Nous-7B)|
@@ -190,6 +192,10 @@ This document provides an overview of various AI providers and models, including
190
192
|german-7b|TheBloke|1+ Providers|[huggingface.co](https://huggingface.co/TheBloke/DiscoLM_German_7b_v1-GGUF)|
191
193
|tinyllama-1.1b|TinyLlama|1+ Providers|[huggingface.co](https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0)|
192
194
|cybertron-7b|TheBloke|1+ Providers|[huggingface.co](https://huggingface.co/fblgit/una-cybertron-7b-v2-bf16)|
195
|openhermes-2.5|Teknium|1+ Providers|[huggingface.co](https://huggingface.co/datasets/teknium/OpenHermes-2.5)|
196
|lfm-40b|Liquid|1+ Providers|[liquid.ai](https://www.liquid.ai/liquid-foundation-models)|
197
|zephyr-7b|HuggingFaceH4|1+ Providers|[huggingface.co](https://huggingface.co/HuggingFaceH4/zephyr-7b-beta)|
198
193
199
194
200
### Image Models
195
201
| Model | Base Provider | Providers | Website |
@@ -1,105 +1,30 @@
1
1
from __future__ import annotations
2
import random
3
import json
4
import re
2
from typing import Any, Dict
3
import inspect
4
5
5
from aiohttp import ClientSession
6
6
7
from ..typing import AsyncResult, Messages
7
8
from .base_provider import AsyncGeneratorProvider, ProviderModelMixin
8
from ..image import ImageResponse
9
10
def split_long_message(message: str, max_length: int = 4000) -> list[str]:
11
return [message[i:i+max_length] for i in range(0, len(message), max_length)]
9
from .helper import format_prompt
10
from .airforce.AirforceChat import AirforceChat
11
from .airforce.AirforceImage import AirforceImage
12
12
13
13
class Airforce(AsyncGeneratorProvider, ProviderModelMixin):
14
14
url = "https://api.airforce"
15
image_api_endpoint = "https://api.airforce/imagine2"
16
text_api_endpoint = "https://api.airforce/chat/completions"
15
api_endpoint_completions = AirforceChat.api_endpoint_completions
16
api_endpoint_imagine2 = AirforceImage.api_endpoint_imagine2
17
17
working = True
18
supports_stream = AirforceChat.supports_stream
19
supports_system_message = AirforceChat.supports_system_message
20
supports_message_history = AirforceChat.supports_message_history
18
21
19
default_model = 'llama-3-70b-chat'
20
21
supports_stream = True
22
supports_system_message = True
23
supports_message_history = True
24
25
text_models = [
26
'claude-3-haiku-20240307',
27
'claude-3-sonnet-20240229',
28
'claude-3-5-sonnet-20240620',
29
'claude-3-opus-20240229',
30
'chatgpt-4o-latest',
31
'gpt-4',
32
'gpt-4-turbo',
33
'gpt-4o-mini-2024-07-18',
34
'gpt-4o-mini',
35
'gpt-3.5-turbo',
36
'gpt-3.5-turbo-0125',
37
'gpt-3.5-turbo-1106',
38
default_model,
39
'llama-3-70b-chat-turbo',
40
'llama-3-8b-chat',
41
'llama-3-8b-chat-turbo',
42
'llama-3-70b-chat-lite',
43
'llama-3-8b-chat-lite',
44
'llama-2-13b-chat',
45
'llama-3.1-405b-turbo',
46
'llama-3.1-70b-turbo',
47
'llama-3.1-8b-turbo',
48
'LlamaGuard-2-8b',
49
'Llama-Guard-7b',
50
'Llama-3.2-90B-Vision-Instruct-Turbo',
51
'Mixtral-8x7B-Instruct-v0.1',
52
'Mixtral-8x22B-Instruct-v0.1',
53
'Mistral-7B-Instruct-v0.1',
54
'Mistral-7B-Instruct-v0.2',
55
'Mistral-7B-Instruct-v0.3',
56
'Qwen1.5-7B-Chat',
57
'Qwen1.5-14B-Chat',
58
'Qwen1.5-72B-Chat',
59
'Qwen1.5-110B-Chat',
60
'Qwen2-72B-Instruct',
61
'gemma-2b-it',
62
'gemma-2-9b-it',
63
'gemma-2-27b-it',
64
'gemini-1.5-flash',
65
'gemini-1.5-pro',
66
'deepseek-llm-67b-chat',
67
'Nous-Hermes-2-Mixtral-8x7B-DPO',
68
'Nous-Hermes-2-Yi-34B',
69
'WizardLM-2-8x22B',
70
'SOLAR-10.7B-Instruct-v1.0',
71
'MythoMax-L2-13b',
72
'cosmosrp',
73
]
74
75
image_models = [
76
'flux',
77
'flux-realism',
78
'flux-anime',
79
'flux-3d',
80
'flux-disney',
81
'flux-pixel',
82
'flux-4o',
83
'any-dark',
84
]
85
86
models = [
87
*text_models,
88
*image_models,
89
]
22
default_model = AirforceChat.default_model
23
models = [*AirforceChat.text_models, *AirforceImage.image_models]
90
24
91
25
model_aliases = {
92
"claude-3-haiku": "claude-3-haiku-20240307",
93
"claude-3-sonnet": "claude-3-sonnet-20240229",
94
"gpt-4o": "chatgpt-4o-latest",
95
"llama-3-70b": "llama-3-70b-chat",
96
"llama-3-8b": "llama-3-8b-chat",
97
"mixtral-8x7b": "Mixtral-8x7B-Instruct-v0.1",
98
"qwen-1.5-7b": "Qwen1.5-7B-Chat",
99
"gemma-2b": "gemma-2b-it",
100
"gemini-flash": "gemini-1.5-flash",
101
"mythomax-l2-13b": "MythoMax-L2-13b",
102
"solar-10.7b": "SOLAR-10.7B-Instruct-v1.0",
26
**AirforceChat.model_aliases,
27
**AirforceImage.model_aliases
103
28
}
104
29
105
30
@classmethod
@@ -107,139 +32,28 @@ class Airforce(AsyncGeneratorProvider, ProviderModelMixin):
107
32
if model in cls.models:
108
33
return model
109
34
elif model in cls.model_aliases:
110
return cls.model_aliases.get(model, cls.default_model)
35
return cls.model_aliases[model]
111
36
else:
112
37
return cls.default_model
113
38
114
39
@classmethod
115
async def create_async_generator(
116
cls,
117
model: str,
118
messages: Messages,
119
proxy: str = None,
120
seed: int = None,
121
size: str = "1:1",
122
stream: bool = False,
123
**kwargs
124
) -> AsyncResult:
40
async def create_async_generator(cls, model: str, messages: Messages, **kwargs) -> AsyncResult:
125
41
model = cls.get_model(model)
42
43
provider = AirforceChat if model in AirforceChat.text_models else AirforceImage
126
44
127
if model in cls.image_models:
128
async for result in cls._generate_image(model, messages, proxy, seed, size):
129
yield result
130
elif model in cls.text_models:
131
async for result in cls._generate_text(model, messages, proxy, stream):
132
yield result
133
134
@classmethod
135
async def _generate_image(
136
cls,
137
model: str,
138
messages: Messages,
139
proxy: str = None,
140
seed: int = None,
141
size: str = "1:1",
142
**kwargs
143
) -> AsyncResult:
144
headers = {
145
"accept": "*/*",
146
"accept-language": "en-US,en;q=0.9",
147
"cache-control": "no-cache",
148
"origin": "https://llmplayground.net",
149
"user-agent": "Mozilla/5.0"
150
}
151
152
if seed is None:
153
seed = random.randint(0, 100000)
154
155
prompt = messages[-1]['content']
156
157
async with ClientSession(headers=headers) as session:
158
params = {
159
"model": model,
160
"prompt": prompt,
161
"size": size,
162
"seed": seed
163
}
164
async with session.get(f"{cls.image_api_endpoint}", params=params, proxy=proxy) as response:
165
response.raise_for_status()
166
content_type = response.headers.get('Content-Type', '').lower()
45
if model not in provider.models:
46
raise ValueError(f"Unsupported model: {model}")
167
47
168
if 'application/json' in content_type:
169
async for chunk in response.content.iter_chunked(1024):
170
if chunk:
171
yield chunk.decode('utf-8')
172
elif 'image' in content_type:
173
image_data = b""
174
async for chunk in response.content.iter_chunked(1024):
175
if chunk:
176
image_data += chunk
177
image_url = f"{cls.image_api_endpoint}?model={model}&prompt={prompt}&size={size}&seed={seed}"
178
alt_text = f"Generated image for prompt: {prompt}"
179
yield ImageResponse(images=image_url, alt=alt_text)
180
181
@classmethod
182
async def _generate_text(
183
cls,
184
model: str,
185
messages: Messages,
186
proxy: str = None,
187
stream: bool = False,
188
**kwargs
189
) -> AsyncResult:
190
headers = {
191
"accept": "*/*",
192
"accept-language": "en-US,en;q=0.9",
193
"authorization": "Bearer missing api key",
194
"content-type": "application/json",
195
"user-agent": "Mozilla/5.0"
196
}
48
# Get the signature of the provider's create_async_generator method
49
sig = inspect.signature(provider.create_async_generator)
50
51
# Filter kwargs to only include parameters that the provider's method accepts
52
filtered_kwargs = {k: v for k, v in kwargs.items() if k in sig.parameters}
197
53
198
async with ClientSession(headers=headers) as session:
199
formatted_prompt = cls._format_messages(messages)
200
prompt_parts = split_long_message(formatted_prompt)
201
full_response = ""
54
# Add model and messages to filtered_kwargs
55
filtered_kwargs['model'] = model
56
filtered_kwargs['messages'] = messages
202
57
203
for part in prompt_parts:
204
data = {
205
"messages": [{"role": "user", "content": part}],
206
"model": model,
207
"max_tokens": 4096,
208
"temperature": 1,
209
"top_p": 1,
210
"stream": stream
211
}
212
async with session.post(cls.text_api_endpoint, json=data, proxy=proxy) as response:
213
response.raise_for_status()
214
part_response = ""
215
if stream:
216
async for line in response.content:
217
if line:
218
line = line.decode('utf-8').strip()
219
if line.startswith("data: ") and line != "data: [DONE]":
220
json_data = json.loads(line[6:])
221
content = json_data['choices'][0]['delta'].get('content', '')
222
part_response += content
223
else:
224
json_data = await response.json()
225
content = json_data['choices'][0]['message']['content']
226
part_response = content
227
228
part_response = re.sub(
229
r"One message exceeds the \d+chars per message limit\..+https:\/\/discord\.com\/invite\/\S+",
230
'',
231
part_response
232
)
233
234
part_response = re.sub(
235
r"Rate limit \(\d+\/minute\) exceeded\. Join our discord for more: .+https:\/\/discord\.com\/invite\/\S+",
236
'',
237
part_response
238
)
239
240
full_response += part_response
241
yield full_response
242
243
@classmethod
244
def _format_messages(cls, messages: Messages) -> str:
245
return " ".join([msg['content'] for msg in messages])
58
async for result in provider.create_async_generator(**filtered_kwargs):
59
yield result
@@ -0,0 +1,375 @@
1
from __future__ import annotations
2
import re
3
from aiohttp import ClientSession
4
import json
5
from typing import List
6
7
from ...typing import AsyncResult, Messages
8
from ..base_provider import AsyncGeneratorProvider, ProviderModelMixin
9
from ..helper import format_prompt
10
11
def clean_response(text: str) -> str:
12
"""Clean response from unwanted patterns."""
13
patterns = [
14
r"One message exceeds the \d+chars per message limit\..+https:\/\/discord\.com\/invite\/\S+",
15
r"Rate limit \(\d+\/minute\) exceeded\. Join our discord for more: .+https:\/\/discord\.com\/invite\/\S+",
16
r"Rate limit \(\d+\/hour\) exceeded\. Join our discord for more: https:\/\/discord\.com\/invite\/\S+",
17
r"</s>", # zephyr-7b-beta
18
]
19
20
for pattern in patterns:
21
text = re.sub(pattern, '', text)
22
return text.strip()
23
24
def split_message(message: dict, chunk_size: int = 995) -> List[dict]:
25
"""Split a message into chunks of specified size."""
26
content = message.get('content', '')
27
if len(content) <= chunk_size:
28
return [message]
29
30
chunks = []
31
while content:
32
chunk = content[:chunk_size]
33
content = content[chunk_size:]
34
chunks.append({
35
'role': message['role'],
36
'content': chunk
37
})
38
return chunks
39
40
def split_messages(messages: Messages, chunk_size: int = 995) -> Messages:
41
"""Split all messages that exceed chunk_size into smaller messages."""
42
result = []
43
for message in messages:
44
result.extend(split_message(message, chunk_size))
45
return result
46
47
class AirforceChat(AsyncGeneratorProvider, ProviderModelMixin):
48
label = "AirForce Chat"
49
api_endpoint_completions = "https://api.airforce/chat/completions" # Замініть на реальний ендпоінт
50
supports_stream = True
51
supports_system_message = True
52
supports_message_history = True
53
54
default_model = 'llama-3-70b-chat'
55
text_models = [
56
# anthropic
57
'claude-3-haiku-20240307',
58
'claude-3-sonnet-20240229',
59
'claude-3-5-sonnet-20240620',
60
'claude-3-5-sonnet-20241022',
61
'claude-3-opus-20240229',
62
63
# openai
64
'chatgpt-4o-latest',
65
'gpt-4',
66
'gpt-4-turbo',
67
'gpt-4o-2024-05-13',
68
'gpt-4o-mini-2024-07-18',
69
'gpt-4o-mini',
70
'gpt-4o-2024-08-06',
71
'gpt-3.5-turbo',
72
'gpt-3.5-turbo-0125',
73
'gpt-3.5-turbo-1106',
74
'gpt-4o',
75
'gpt-4-turbo-2024-04-09',
76
'gpt-4-0125-preview',
77
'gpt-4-1106-preview',
78
79
# meta-llama
80
default_model,
81
'llama-3-70b-chat-turbo',
82
'llama-3-8b-chat',
83
'llama-3-8b-chat-turbo',
84
'llama-3-70b-chat-lite',
85
'llama-3-8b-chat-lite',
86
'llama-2-13b-chat',
87
'llama-3.1-405b-turbo',
88
'llama-3.1-70b-turbo',
89
'llama-3.1-8b-turbo',
90
'LlamaGuard-2-8b',
91
'llamaguard-7b',
92
'Llama-Vision-Free',
93
'Llama-Guard-7b',
94
'Llama-3.2-90B-Vision-Instruct-Turbo',
95
'Meta-Llama-Guard-3-8B',
96
'Llama-3.2-11B-Vision-Instruct-Turbo',
97
'Llama-Guard-3-11B-Vision-Turbo',
98
'Llama-3.2-3B-Instruct-Turbo',
99
'Llama-3.2-1B-Instruct-Turbo',
100
'llama-2-7b-chat-int8',
101
'llama-2-7b-chat-fp16',
102
'Llama 3.1 405B Instruct',
103
'Llama 3.1 70B Instruct',
104
'Llama 3.1 8B Instruct',
105
106
# mistral-ai
107
'Mixtral-8x7B-Instruct-v0.1',
108
'Mixtral-8x22B-Instruct-v0.1',
109
'Mistral-7B-Instruct-v0.1',
110
'Mistral-7B-Instruct-v0.2',
111
'Mistral-7B-Instruct-v0.3',
112
113
# Gryphe
114
'MythoMax-L2-13b-Lite',
115
'MythoMax-L2-13b',
116
117
# openchat
118
'openchat-3.5-0106',
119
120
# qwen
121
#'Qwen1.5-72B-Chat', Пуста відповідь
122
#'Qwen1.5-110B-Chat', Пуста відповідь
123
'Qwen2-72B-Instruct',
124
'Qwen2.5-7B-Instruct-Turbo',
125
'Qwen2.5-72B-Instruct-Turbo',
126
127
# google
128
'gemma-2b-it',
129
'gemma-2-9b-it',
130
'gemma-2-27b-it',
131
132
# gemini
133
'gemini-1.5-flash',
134
'gemini-1.5-pro',
135
136
# databricks
137
'dbrx-instruct',
138
139
# deepseek-ai
140
'deepseek-coder-6.7b-base',
141
'deepseek-coder-6.7b-instruct',
142
'deepseek-math-7b-instruct',
143
144
# NousResearch
145
'deepseek-math-7b-instruct',
146
'Nous-Hermes-2-Mixtral-8x7B-DPO',
147
'hermes-2-pro-mistral-7b',
148
149
# teknium
150
'openhermes-2.5-mistral-7b',
151
152
# microsoft
153
'WizardLM-2-8x22B',
154
'phi-2',
155
156
# upstage
157
'SOLAR-10.7B-Instruct-v1.0',
158
159
# pawan
160
'cosmosrp',
161
162
# liquid
163
'lfm-40b-moe',
164
165
# DiscoResearch
166
'discolm-german-7b-v1',
167
168
# tiiuae
169
'falcon-7b-instruct',
170
171
# defog
172
'sqlcoder-7b-2',
173
174
# tinyllama
175
'tinyllama-1.1b-chat',
176
177
# HuggingFaceH4
178
'zephyr-7b-beta',
179
]
180
181
models = [*text_models]
182
183
model_aliases = {
184
# anthropic
185
"claude-3-haiku": "claude-3-haiku-20240307",
186
"claude-3-sonnet": "claude-3-sonnet-20240229",
187
"claude-3.5-sonnet": "claude-3-5-sonnet-20240620",
188
"claude-3.5-sonnet": "claude-3-5-sonnet-20241022",
189
"claude-3-opus": "claude-3-opus-20240229",
190
191
# openai
192
"gpt-4o": "chatgpt-4o-latest",
193
#"gpt-4": "gpt-4",
194
#"gpt-4-turbo": "gpt-4-turbo",
195
"gpt-4o": "gpt-4o-2024-05-13",
196
"gpt-4o-mini": "gpt-4o-mini-2024-07-18",
197
#"gpt-4o-mini": "gpt-4o-mini",
198
"gpt-4o": "gpt-4o-2024-08-06",
199
"gpt-3.5-turbo": "gpt-3.5-turbo",
200
"gpt-3.5-turbo": "gpt-3.5-turbo-0125",
201
"gpt-3.5-turbo": "gpt-3.5-turbo-1106",
202
#"gpt-4o": "gpt-4o",
203
"gpt-4-turbo": "gpt-4-turbo-2024-04-09",
204
"gpt-4": "gpt-4-0125-preview",
205
"gpt-4": "gpt-4-1106-preview",
206
207
# meta-llama
208
"llama-3-70b": "llama-3-70b-chat",
209
"llama-3-8b": "llama-3-8b-chat",
210
"llama-3-8b": "llama-3-8b-chat-turbo",
211
"llama-3-70b": "llama-3-70b-chat-lite",
212
"llama-3-8b": "llama-3-8b-chat-lite",
213
"llama-2-13b": "llama-2-13b-chat",
214
"llama-3.1-405b": "llama-3.1-405b-turbo",
215
"llama-3.1-70b": "llama-3.1-70b-turbo",
216
"llama-3.1-8b": "llama-3.1-8b-turbo",
217
"llamaguard-2-8b": "LlamaGuard-2-8b",
218
"llamaguard-7b": "llamaguard-7b",
219
#"llama_vision_free": "Llama-Vision-Free", # Unknown
220
"llamaguard-7b": "Llama-Guard-7b",
221
"llama-3.2-90b": "Llama-3.2-90B-Vision-Instruct-Turbo",
222
"llamaguard-3-8b": "Meta-Llama-Guard-3-8B",
223
"llama-3.2-11b": "Llama-3.2-11B-Vision-Instruct-Turbo",
224
"llamaguard-3-11b": "Llama-Guard-3-11B-Vision-Turbo",
225
"llama-3.2-3b": "Llama-3.2-3B-Instruct-Turbo",
226
"llama-3.2-1b": "Llama-3.2-1B-Instruct-Turbo",
227
"llama-2-7b": "llama-2-7b-chat-int8",
228
"llama-2-7b": "llama-2-7b-chat-fp16",
229
"llama-3.1-405b": "Llama 3.1 405B Instruct",
230
"llama-3.1-70b": "Llama 3.1 70B Instruct",
231
"llama-3.1-8b": "Llama 3.1 8B Instruct",
232
233
# mistral-ai
234
"mixtral-8x7b": "Mixtral-8x7B-Instruct-v0.1",
235
"mixtral-8x22b": "Mixtral-8x22B-Instruct-v0.1",
236
"mixtral-8x7b": "Mistral-7B-Instruct-v0.1",
237
"mixtral-8x7b": "Mistral-7B-Instruct-v0.2",
238
"mixtral-8x7b": "Mistral-7B-Instruct-v0.3",
239
240
# Gryphe
241
"mythomax-13b": "MythoMax-L2-13b-Lite",
242
"mythomax-13b": "MythoMax-L2-13b",
243
244
# openchat
245
"openchat-3.5": "openchat-3.5-0106",
246
247
# qwen
248
#"qwen-1.5-72b": "Qwen1.5-72B-Chat", # Empty answer
249
#"qwen-1.5-110b": "Qwen1.5-110B-Chat", # Empty answer
250
"qwen-2-72b": "Qwen2-72B-Instruct",
251
"qwen-2-5-7b": "Qwen2.5-7B-Instruct-Turbo",
252
"qwen-2-5-72b": "Qwen2.5-72B-Instruct-Turbo",
253
254
# google
255
"gemma-2b": "gemma-2b-it",
256
"gemma-2-9b": "gemma-2-9b-it",
257
"gemma-2b-27b": "gemma-2-27b-it",
258
259
# gemini
260
"gemini-flash": "gemini-1.5-flash",
261
"gemini-pro": "gemini-1.5-pro",
262
263
# databricks
264
"dbrx-instruct": "dbrx-instruct",
265
266
# deepseek-ai
267
#"deepseek-coder": "deepseek-coder-6.7b-base",
268
"deepseek-coder": "deepseek-coder-6.7b-instruct",
269
#"deepseek-math": "deepseek-math-7b-instruct",
270
271
# NousResearch
272
#"deepseek-math": "deepseek-math-7b-instruct",
273
"hermes-2-dpo": "Nous-Hermes-2-Mixtral-8x7B-DPO",
274
"hermes-2": "hermes-2-pro-mistral-7b",
275
276
# teknium
277
"openhermes-2.5": "openhermes-2.5-mistral-7b",
278
279
# microsoft
280
"wizardlm-2-8x22b": "WizardLM-2-8x22B",
281
#"phi-2": "phi-2",
282
283
# upstage
284
"solar-10-7b": "SOLAR-10.7B-Instruct-v1.0",
285
286
# pawan
287
#"cosmosrp": "cosmosrp",
288
289
# liquid
290
"lfm-40b": "lfm-40b-moe",
291
292
# DiscoResearch
293
"german-7b": "discolm-german-7b-v1",
294
295
# tiiuae
296
#"falcon-7b": "falcon-7b-instruct",
297
298
# defog
299
#"sqlcoder-7b": "sqlcoder-7b-2",
300
301
# tinyllama
302
#"tinyllama-1b": "tinyllama-1.1b-chat",
303
304
# HuggingFaceH4
305
"zephyr-7b": "zephyr-7b-beta",
306
}
307
308
@classmethod
309
async def create_async_generator(
310
cls,
311
model: str,
312
messages: Messages,
313
stream: bool = False,
314
proxy: str = None,
315
max_tokens: str = 4096,
316
temperature: str = 1,
317
top_p: str = 1,
318
**kwargs
319
) -> AsyncResult:
320
model = cls.get_model(model)
321
322
chunked_messages = split_messages(messages)
323
324
headers = {
325
'accept': '*/*',
326
'accept-language': 'en-US,en;q=0.9',
327
'authorization': 'Bearer missing api key',
328
'cache-control': 'no-cache',
329
'content-type': 'application/json',
330
'origin': 'https://llmplayground.net',
331
'pragma': 'no-cache',
332
'priority': 'u=1, i',
333
'referer': 'https://llmplayground.net/',
334
'sec-ch-ua': '"Not?A_Brand";v="99", "Chromium";v="130"',
335
'sec-ch-ua-mobile': '?0',
336
'sec-ch-ua-platform': '"Linux"',
337
'sec-fetch-dest': 'empty',
338
'sec-fetch-mode': 'cors',
339
'sec-fetch-site': 'cross-site',
340
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36'
341
}
342
343
data = {
344
"messages": chunked_messages,
345
"model": model,
346
"max_tokens": max_tokens,
347
"temperature": temperature,
348
"top_p": top_p,
349
"stream": stream
350
}
351
352
async with ClientSession(headers=headers) as session:
353
async with session.post(cls.api_endpoint_completions, json=data, proxy=proxy) as response:
354
response.raise_for_status()
355
text = ""
356
if stream:
357
async for line in response.content:
358
line = line.decode('utf-8')
359
if line.startswith('data: '):
360
json_str = line[6:]
361
try:
362
chunk = json.loads(json_str)
363
if 'choices' in chunk and chunk['choices']:
364
content = chunk['choices'][0].get('delta', {}).get('content', '')
365
text += content # Збираємо дельти
366
except json.JSONDecodeError as e:
367
print(f"Error decoding JSON: {json_str}, Error: {e}")
368
elif line.strip() == "[DONE]":
369
break
370
yield clean_response(text)
371
else:
372
response_json = await response.json()
373
text = response_json["choices"][0]["message"]["content"]
374
yield clean_response(text)
375
@@ -0,0 +1,97 @@
1
from __future__ import annotations
2
3
from aiohttp import ClientSession
4
import random
5
6
from ...typing import AsyncResult, Messages
7
from ..base_provider import AsyncGeneratorProvider, ProviderModelMixin
8
from ...image import ImageResponse
9
10
11
class AirforceImage(AsyncGeneratorProvider, ProviderModelMixin):
12
label = "Airforce Image"
13
#url = "https://api.airforce"
14
api_endpoint_imagine2 = "https://api.airforce/imagine2"
15
#working = True
16
17
default_model = 'flux'
18
image_models = [
19
'flux',
20
'flux-realism',
21
'flux-anime',
22
'flux-3d',
23
'flux-disney',
24
'flux-pixel',
25
'flux-4o',
26
'any-dark',
27
'stable-diffusion-xl-base',
28
'stable-diffusion-xl-lightning',
29
]
30
models = [*image_models]
31
32
model_aliases = {
33
"sdxl": "stable-diffusion-xl-base",
34
"sdxl": "stable-diffusion-xl-lightning",
35
}
36
37
38
@classmethod
39
def get_model(cls, model: str) -> str:
40
if model in cls.models:
41
return model
42
elif model in cls.model_aliases:
43
return cls.model_aliases[model]
44
else:
45
return cls.default_model
46
47
@classmethod
48
async def create_async_generator(
49
cls,
50
model: str,
51
messages: Messages,
52
size: str = '1:1',
53
proxy: str = None,
54
**kwargs
55
) -> AsyncResult:
56
model = cls.get_model(model)
57
58
headers = {
59
'accept': '*/*',
60
'accept-language': 'en-US,en;q=0.9',
61
'authorization': 'Bearer missing api key',
62
'cache-control': 'no-cache',
63
'origin': 'https://llmplayground.net',
64
'pragma': 'no-cache',
65
'priority': 'u=1, i',
66
'referer': 'https://llmplayground.net/',
67
'sec-ch-ua': '"Not?A_Brand";v="99", "Chromium";v="130"',
68
'sec-ch-ua-mobile': '?0',
69
'sec-ch-ua-platform': '"Linux"',
70
'sec-fetch-dest': 'empty',
71
'sec-fetch-mode': 'cors',
72
'sec-fetch-site': 'cross-site',
73
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36'
74
}
75
76
async with ClientSession(headers=headers) as session:
77
prompt = messages[-1]['content']
78
seed = random.randint(0, 4294967295)
79
params = {
80
'model': model,
81
'prompt': prompt,
82
'size': size,
83
'seed': str(seed)
84
}
85
async with session.get(cls.api_endpoint_imagine2, params=params, proxy=proxy) as response:
86
response.raise_for_status()
87
if response.status == 200:
88
content_type = response.headers.get('Content-Type', '')
89
if 'image' in content_type:
90
image_url = str(response.url)
91
yield ImageResponse(image_url, alt="Airforce generated image")
92
else:
93
content = await response.text()
94
yield f"Unexpected content type: {content_type}\nResponse content: {content}"
95
else:
96
error_content = await response.text()
97
yield f"Error: {error_content}"
@@ -0,0 +1,2 @@
1
from .AirforceChat import AirforceChat
2
from .AirforceImage import AirforceImage
@@ -130,7 +130,7 @@ gpt_3 = Model(
130
130
gpt_35_turbo = Model(
131
131
name = 'gpt-3.5-turbo',
132
132
base_provider = 'OpenAI',
133
best_provider = IterListProvider([Allyfy, NexraChatGPT, Airforce, DarkAI, Liaobots])
133
best_provider = IterListProvider([Allyfy, NexraChatGPT, DarkAI, Airforce, Liaobots])
134
134
)
135
135
136
136
# gpt-4
@@ -191,7 +191,7 @@ meta = Model(
191
191
llama_2_7b = Model(
192
192
name = "llama-2-7b",
193
193
base_provider = "Meta Llama",
194
best_provider = Cloudflare
194
best_provider = IterListProvider([Cloudflare, Airforce])
195
195
)
196
196
197
197
llama_2_13b = Model(
@@ -217,13 +217,13 @@ llama_3_70b = Model(
217
217
llama_3_1_8b = Model(
218
218
name = "llama-3.1-8b",
219
219
base_provider = "Meta Llama",
220
best_provider = IterListProvider([Blackbox, DeepInfraChat, ChatHub, Cloudflare, Airforce, GizAI, PerplexityLabs])
220
best_provider = IterListProvider([Blackbox, DeepInfraChat, ChatHub, Cloudflare, GizAI, Airforce, PerplexityLabs])
221
221
)
222
222
223
223
llama_3_1_70b = Model(
224
224
name = "llama-3.1-70b",
225
225
base_provider = "Meta Llama",
226
best_provider = IterListProvider([DDG, HuggingChat, Blackbox, FreeGpt, TeachAnything, Free2GPT, DeepInfraChat, DarkAI, Airforce, AiMathGPT, RubiksAI, GizAI, HuggingFace, PerplexityLabs])
226
best_provider = IterListProvider([DDG, HuggingChat, Blackbox, FreeGpt, TeachAnything, Free2GPT, DeepInfraChat, DarkAI, AiMathGPT, RubiksAI, GizAI, Airforce, HuggingFace, PerplexityLabs])
227
227
)
228
228
229
229
llama_3_1_405b = Model(
@@ -236,19 +236,19 @@ llama_3_1_405b = Model(
236
236
llama_3_2_1b = Model(
237
237
name = "llama-3.2-1b",
238
238
base_provider = "Meta Llama",
239
best_provider = Cloudflare
239
best_provider = IterListProvider([Cloudflare, Airforce])
240
240
)
241
241
242
242
llama_3_2_3b = Model(
243
243
name = "llama-3.2-3b",
244
244
base_provider = "Meta Llama",
245
best_provider = Cloudflare
245
best_provider = IterListProvider([Cloudflare, Airforce])
246
246
)
247
247
248
248
llama_3_2_11b = Model(
249
249
name = "llama-3.2-11b",
250
250
base_provider = "Meta Llama",
251
best_provider = IterListProvider([Cloudflare, HuggingChat, HuggingFace])
251
best_provider = IterListProvider([Cloudflare, HuggingChat, Airforce, HuggingFace])
252
252
)
253
253
254
254
llama_3_2_90b = Model(
@@ -271,6 +271,18 @@ llamaguard_2_8b = Model(
271
271
best_provider = Airforce
272
272
)
273
273
274
llamaguard_3_8b = Model(
275
name = "llamaguard-3-8b",
276
base_provider = "Meta Llama",
277
best_provider = Airforce
278
)
279
280
llamaguard_3_11b = Model(
281
name = "llamaguard-3-11b",
282
base_provider = "Meta Llama",
283
best_provider = Airforce
284
)
285
274
286
275
287
### Mistral ###
276
288
mistral_7b = Model(
@@ -305,14 +317,14 @@ mistral_large = Model(
305
317
306
318
307
319
### NousResearch ###
308
mixtral_8x7b_dpo = Model(
309
name = "mixtral-8x7b-dpo",
320
hermes_2 = Model(
321
name = "hermes-2",
310
322
base_provider = "NousResearch",
311
323
best_provider = Airforce
312
324
)
313
325
314
yi_34b = Model(
315
name = "yi-34b",
326
hermes_2_dpo = Model(
327
name = "hermes-2-dpo",
316
328
base_provider = "NousResearch",
317
329
best_provider = Airforce
318
330
)
@@ -328,7 +340,7 @@ hermes_3 = Model(
328
340
phi_2 = Model(
329
341
name = "phi-2",
330
342
base_provider = "Microsoft",
331
best_provider = Cloudflare
343
best_provider = IterListProvider([Cloudflare, Airforce])
332
344
)
333
345
334
346
phi_3_medium_4k = Model(
@@ -364,10 +376,10 @@ gemini = Model(
364
376
)
365
377
366
378
# gemma
367
gemma_2b_9b = Model(
368
name = 'gemma-2b-9b',
379
gemma_2b = Model(
380
name = 'gemma-2b',
369
381
base_provider = 'Google',
370
best_provider = Airforce
382
best_provider = IterListProvider([ReplicateHome, Airforce])
371
383
)
372
384
373
385
gemma_2b_27b = Model(
@@ -376,12 +388,6 @@ gemma_2b_27b = Model(
376
388
best_provider = IterListProvider([DeepInfraChat, Airforce])
377
389
)
378
390
379
gemma_2b = Model(
380
name = 'gemma-2b',
381
base_provider = 'Google',
382
best_provider = IterListProvider([ReplicateHome, Airforce])
383
)
384
385
391
gemma_7b = Model(
386
392
name = 'gemma-7b',
387
393
base_provider = 'Google',
@@ -389,18 +395,18 @@ gemma_7b = Model(
389
395
)
390
396
391
397
# gemma 2
392
gemma_2_27b = Model(
393
name = 'gemma-2-27b',
394
base_provider = 'Google',
395
best_provider = Airforce
396
)
397
398
398
gemma_2 = Model(
399
399
name = 'gemma-2',
400
400
base_provider = 'Google',
401
401
best_provider = ChatHub
402
402
)
403
403
404
gemma_2_9b = Model(
405
name = 'gemma-2-9b',
406
base_provider = 'Google',
407
best_provider = Airforce
408
)
409
404
410
405
411
### Anthropic ###
406
412
claude_2_1 = Model(
@@ -413,26 +419,26 @@ claude_2_1 = Model(
413
419
claude_3_opus = Model(
414
420
name = 'claude-3-opus',
415
421
base_provider = 'Anthropic',
416
best_provider = IterListProvider([Airforce, Liaobots])
422
best_provider = IterListProvider([Liaobots])
417
423
)
418
424
419
425
claude_3_sonnet = Model(
420
426
name = 'claude-3-sonnet',
421
427
base_provider = 'Anthropic',
422
best_provider = IterListProvider([Airforce, Liaobots])
428
best_provider = IterListProvider([Liaobots])
423
429
)
424
430
425
431
claude_3_haiku = Model(
426
432
name = 'claude-3-haiku',
427
433
base_provider = 'Anthropic',
428
best_provider = IterListProvider([DDG, Airforce, GizAI, Liaobots])
434
best_provider = IterListProvider([DDG, GizAI, Liaobots])
429
435
)
430
436
431
437
# claude 3.5
432
438
claude_3_5_sonnet = Model(
433
439
name = 'claude-3.5-sonnet',
434
440
base_provider = 'Anthropic',
435
best_provider = IterListProvider([Blackbox, Editee, AmigoChat, Airforce, GizAI, Liaobots])
441
best_provider = IterListProvider([Blackbox, Editee, AmigoChat, GizAI, Liaobots])
436
442
)
437
443
438
444
@@ -493,40 +499,34 @@ qwen_1_5_0_5b = Model(
493
499
qwen_1_5_7b = Model(
494
500
name = 'qwen-1.5-7b',
495
501
base_provider = 'Qwen',
496
best_provider = IterListProvider([Cloudflare, Airforce])
502
best_provider = IterListProvider([Cloudflare])
497
503
)
498
504
499
505
qwen_1_5_14b = Model(
500
506
name = 'qwen-1.5-14b',
501
507
base_provider = 'Qwen',
502
best_provider = IterListProvider([FreeChatgpt, Cloudflare, Airforce])
508
best_provider = IterListProvider([FreeChatgpt, Cloudflare])
503
509
)
504
510
505
qwen_1_5_72b = Model(
506
name = 'qwen-1.5-72b',
511
# qwen 2
512
qwen_2_72b = Model(
513
name = 'qwen-2-72b',
507
514
base_provider = 'Qwen',
508
best_provider = Airforce
515
best_provider = IterListProvider([DeepInfraChat, HuggingChat, Airforce, HuggingFace])
509
516
)
510
517
511
qwen_1_5_110b = Model(
512
name = 'qwen-1.5-110b',
518
qwen_2_5_7b = Model(
519
name = 'qwen-2-5-7b',
513
520
base_provider = 'Qwen',
514
521
best_provider = Airforce
515
522
)
516
523
517
qwen_1_5_1_8b = Model(
518
name = 'qwen-1.5-1.8b',
524
qwen_2_5_72b = Model(
525
name = 'qwen-2-5-72b',
519
526
base_provider = 'Qwen',
520
527
best_provider = Airforce
521
528
)
522
529
523
# qwen 2
524
qwen_2_72b = Model(
525
name = 'qwen-2-72b',
526
base_provider = 'Qwen',
527
best_provider = IterListProvider([DeepInfraChat, HuggingChat, Airforce, HuggingFace])
528
)
529
530
530
qwen = Model(
531
531
name = 'qwen',
532
532
base_provider = 'Qwen',
@@ -556,18 +556,18 @@ yi_1_5_9b = Model(
556
556
)
557
557
558
558
### Upstage ###
559
solar_1_mini = Model(
560
name = 'solar-1-mini',
561
base_provider = 'Upstage',
562
best_provider = Upstage
563
)
564
565
559
solar_10_7b = Model(
566
560
name = 'solar-10-7b',
567
561
base_provider = 'Upstage',
568
562
best_provider = Airforce
569
563
)
570
564
565
solar_mini = Model(
566
name = 'solar-mini',
567
base_provider = 'Upstage',
568
best_provider = Upstage
569
)
570
571
571
solar_pro = Model(
572
572
name = 'solar-pro',
573
573
base_provider = 'Upstage',
@@ -583,8 +583,8 @@ pi = Model(
583
583
)
584
584
585
585
### DeepSeek ###
586
deepseek = Model(
587
name = 'deepseek',
586
deepseek_coder = Model(
587
name = 'deepseek-coder',
588
588
base_provider = 'DeepSeek',
589
589
best_provider = Airforce
590
590
)
@@ -630,7 +630,7 @@ lzlv_70b = Model(
630
630
openchat_3_5 = Model(
631
631
name = 'openchat-3.5',
632
632
base_provider = 'OpenChat',
633
best_provider = Cloudflare
633
best_provider = IterListProvider([Cloudflare])
634
634
)
635
635
636
636
openchat_3_6_8b = Model(
@@ -683,23 +683,6 @@ sonar_chat = Model(
683
683
best_provider = PerplexityLabs
684
684
)
685
685
686
687
### Gryphe ###
688
mythomax_l2_13b = Model(
689
name = 'mythomax-l2-13b',
690
base_provider = 'Gryphe',
691
best_provider = Airforce
692
)
693
694
695
### Pawan ###
696
cosmosrp = Model(
697
name = 'cosmosrp',
698
base_provider = 'Pawan',
699
best_provider = Airforce
700
)
701
702
703
686
### TheBloke ###
704
687
german_7b = Model(
705
688
name = 'german-7b',
@@ -708,14 +691,6 @@ german_7b = Model(
708
691
)
709
692
710
693
711
### Tinyllama ###
712
tinyllama_1_1b = Model(
713
name = 'tinyllama-1.1b',
714
base_provider = 'Tinyllama',
715
best_provider = Cloudflare
716
)
717
718
719
694
### Fblgit ###
720
695
cybertron_7b = Model(
721
696
name = 'cybertron-7b',
@@ -723,6 +698,7 @@ cybertron_7b = Model(
723
698
best_provider = Cloudflare
724
699
)
725
700
701
726
702
### Nvidia ###
727
703
nemotron_70b = Model(
728
704
name = 'nemotron-70b',
@@ -731,6 +707,46 @@ nemotron_70b = Model(
731
707
)
732
708
733
709
710
### Teknium ###
711
openhermes_2_5 = Model(
712
name = 'openhermes-2.5',
713
base_provider = 'Teknium',
714
best_provider = Airforce
715
)
716
717
718
### Pawan ###
719
cosmosrp = Model(
720
name = 'cosmosrp',
721
base_provider = 'Pawan',
722
best_provider = Airforce
723
)
724
725
726
### Liquid ###
727
lfm_40b = Model(
728
name = 'lfm-40b',
729
base_provider = 'Liquid',
730
best_provider = Airforce
731
)
732
733
734
### DiscoResearch ###
735
german_7b = Model(
736
name = 'german-7b',
737
base_provider = 'DiscoResearch',
738
best_provider = Airforce
739
)
740
741
742
### HuggingFaceH4 ###
743
zephyr_7b = Model(
744
name = 'zephyr-7b',
745
base_provider = 'HuggingFaceH4',
746
best_provider = Airforce
747
)
748
749
734
750
735
751
#############
736
752
### Image ###
@@ -754,7 +770,7 @@ sdxl_lora = Model(
754
770
sdxl = Model(
755
771
name = 'sdxl',
756
772
base_provider = 'Stability AI',
757
best_provider = IterListProvider([ReplicateHome])
773
best_provider = IterListProvider([ReplicateHome, Airforce])
758
774
759
775
)
760
776
@@ -947,6 +963,8 @@ class ModelUtils:
947
963
# llamaguard
948
964
'llamaguard-7b': llamaguard_7b,
949
965
'llamaguard-2-8b': llamaguard_2_8b,
966
'llamaguard-3-8b': llamaguard_3_8b,
967
'llamaguard-3-11b': llamaguard_3_11b,
950
968
951
969
952
970
### Mistral ###
@@ -958,17 +976,17 @@ class ModelUtils:
958
976
959
977
960
978
### NousResearch ###
961
'mixtral-8x7b-dpo': mixtral_8x7b_dpo,
979
'hermes-2': hermes_2,
980
'hermes-2-dpo': hermes_2_dpo,
962
981
'hermes-3': hermes_3,
963
964
'yi-34b': yi_34b,
965
966
982
983
967
984
### Microsoft ###
968
985
'phi-2': phi_2,
969
986
'phi_3_medium-4k': phi_3_medium_4k,
970
987
'phi-3.5-mini': phi_3_5_mini,
971
988
989
972
990
### Google ###
973
991
# gemini
974
992
'gemini': gemini,
@@ -977,13 +995,12 @@ class ModelUtils:
977
995
978
996
# gemma
979
997
'gemma-2b': gemma_2b,
980
'gemma-2b-9b': gemma_2b_9b,
981
998
'gemma-2b-27b': gemma_2b_27b,
982
999
'gemma-7b': gemma_7b,
983
1000
984
1001
# gemma-2
985
1002
'gemma-2': gemma_2,
986
'gemma-2-27b': gemma_2_27b,
1003
'gemma-2-9b': gemma_2_9b,
987
1004
988
1005
989
1006
### Anthropic ###
@@ -1028,10 +1045,9 @@ class ModelUtils:
1028
1045
'qwen-1.5-0.5b': qwen_1_5_0_5b,
1029
1046
'qwen-1.5-7b': qwen_1_5_7b,
1030
1047
'qwen-1.5-14b': qwen_1_5_14b,
1031
'qwen-1.5-72b': qwen_1_5_72b,
1032
'qwen-1.5-110b': qwen_1_5_110b,
1033
'qwen-1.5-1.8b': qwen_1_5_1_8b,
1034
1048
'qwen-2-72b': qwen_2_72b,
1049
'qwen-2-5-7b': qwen_2_5_7b,
1050
'qwen-2-5-72b': qwen_2_5_72b,
1035
1051
1036
1052
1037
1053
### Zhipu AI ###
@@ -1044,16 +1060,17 @@ class ModelUtils:
1044
1060
1045
1061
1046
1062
### Upstage ###
1047
'solar-mini': solar_1_mini,
1048
1063
'solar-10-7b': solar_10_7b,
1064
'solar-mini': solar_mini,
1049
1065
'solar-pro': solar_pro,
1050
1066
1051
1067
1052
1068
### Inflection ###
1053
1069
'pi': pi,
1054
1070
1071
1055
1072
### DeepSeek ###
1056
'deepseek': deepseek,
1073
'deepseek-coder': deepseek_coder,
1057
1074
1058
1075
1059
1076
### Yorickvp ###
@@ -1094,30 +1111,38 @@ class ModelUtils:
1094
1111
### Perplexity AI ###
1095
1112
'sonar-online': sonar_online,
1096
1113
'sonar-chat': sonar_chat,
1097
1098
1099
### Gryphe ###
1100
'mythomax-l2-13b': sonar_chat,
1101
1102
1103
### Pawan ###
1104
'cosmosrp': cosmosrp,
1105
1114
1106
1115
1107
1116
### TheBloke ###
1108
1117
'german-7b': german_7b,
1109
1118
1110
1119
1111
### Tinyllama ###
1112
'tinyllama-1.1b': tinyllama_1_1b,
1113
1114
1115
1120
### Fblgit ###
1116
1121
'cybertron-7b': cybertron_7b,
1117
1122
1118
1123
1119
1124
### Nvidia ###
1120
1125
'nemotron-70b': nemotron_70b,
1126
1127
1128
### Teknium ###
1129
'openhermes-2.5': openhermes_2_5,
1130
1131
1132
### Pawan ###
1133
'cosmosrp': cosmosrp,
1134
1135
1136
### Liquid ###
1137
'lfm-40b': lfm_40b,
1138
1139
1140
### DiscoResearch ###
1141
'german-7b': german_7b,
1142
1143
1144
### HuggingFaceH4 ###
1145
'zephyr-7b': zephyr_7b,
1121
1146
1122
1147
1123
1148