mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-15 14:51:19 -08:00
Compare commits
3 commits
36e66950ca
...
9c7fc9fe4a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c7fc9fe4a | ||
|
|
f8978c1437 | ||
|
|
fb26557dbb |
5 changed files with 2402 additions and 1190 deletions
|
|
@ -1,5 +1,3 @@
|
||||||
version: '3'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
g4f-slim:
|
g4f-slim:
|
||||||
container_name: g4f-slim
|
container_name: g4f-slim
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
version: '3'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
gpt4free:
|
gpt4free:
|
||||||
image: hlohaus789/g4f:latest
|
image: hlohaus789/g4f:latest
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -195,18 +195,22 @@ class AnyModelProviderMixin(ProviderModelMixin):
|
||||||
cls.video_models.extend([clean_name(model) for model in provider.video_models])
|
cls.video_models.extend([clean_name(model) for model in provider.video_models])
|
||||||
|
|
||||||
for provider in Provider.__providers__:
|
for provider in Provider.__providers__:
|
||||||
if provider.working and hasattr(provider, "get_models") and provider not in [AnyProvider, Custom, PollinationsImage, OpenaiAccount]:
|
try:
|
||||||
for model in provider.get_models():
|
if provider.working and hasattr(provider, "get_models") and provider not in [AnyProvider, Custom, PollinationsImage, OpenaiAccount]:
|
||||||
clean = clean_name(model)
|
for model in provider.get_models():
|
||||||
if clean in cls.model_map:
|
clean = clean_name(model)
|
||||||
cls.model_map[clean].update({provider.__name__: model})
|
if clean in cls.model_map:
|
||||||
for alias, model in provider.model_aliases.items():
|
cls.model_map[clean].update({provider.__name__: model})
|
||||||
if alias in cls.model_map:
|
for alias, model in provider.model_aliases.items():
|
||||||
cls.model_map[alias].update({provider.__name__: model})
|
if alias in cls.model_map:
|
||||||
if provider == GeminiPro:
|
cls.model_map[alias].update({provider.__name__: model})
|
||||||
for model in cls.model_map.keys():
|
if provider == GeminiPro:
|
||||||
if "gemini" in model or "gemma" in model:
|
for model in cls.model_map.keys():
|
||||||
cls.model_map[alias].update({provider.__name__: model})
|
if "gemini" in model or "gemma" in model:
|
||||||
|
cls.model_map[alias].update({provider.__name__: model})
|
||||||
|
except Exception as e:
|
||||||
|
debug.error(f"Error getting models for provider {provider.__name__}:", e)
|
||||||
|
continue
|
||||||
|
|
||||||
# Process audio providers
|
# Process audio providers
|
||||||
for provider in [Microsoft_Phi_4_Multimodal, PollinationsAI]:
|
for provider in [Microsoft_Phi_4_Multimodal, PollinationsAI]:
|
||||||
|
|
@ -220,7 +224,6 @@ class AnyModelProviderMixin(ProviderModelMixin):
|
||||||
|
|
||||||
cls.video_models.append("video")
|
cls.video_models.append("video")
|
||||||
cls.model_map["video"] = {"Video": "video"}
|
cls.model_map["video"] = {"Video": "video"}
|
||||||
del cls.model_map[""]
|
|
||||||
cls.audio_models = [*cls.audio_models]
|
cls.audio_models = [*cls.audio_models]
|
||||||
|
|
||||||
# Create a mapping of parent providers to their children
|
# Create a mapping of parent providers to their children
|
||||||
|
|
|
||||||
|
|
@ -18,4 +18,3 @@ python-multipart
|
||||||
a2wsgi
|
a2wsgi
|
||||||
python-dotenv
|
python-dotenv
|
||||||
ddgs
|
ddgs
|
||||||
aiofile
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue