summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-01-30 08:14:04 +0100
committerGitHub <noreply@github.com>2024-01-30 08:14:04 +0100
commitbf1d642ecf0f2d905a77bdc6b5ef68ec5b4fb6e1 (patch)
tree23af70968e2d4cceeaf503f216405e5cbf987042
parentMerge pull request #1527 from hlohaus/readme (diff)
parentFix DeepInfra: Model is not supported (diff)
downloadgpt4free-0.2.0.8.tar
gpt4free-0.2.0.8.tar.gz
gpt4free-0.2.0.8.tar.bz2
gpt4free-0.2.0.8.tar.lz
gpt4free-0.2.0.8.tar.xz
gpt4free-0.2.0.8.tar.zst
gpt4free-0.2.0.8.zip
-rw-r--r--g4f/Provider/DeepInfra.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/g4f/Provider/DeepInfra.py b/g4f/Provider/DeepInfra.py
index 09b9464e..8e36128d 100644
--- a/g4f/Provider/DeepInfra.py
+++ b/g4f/Provider/DeepInfra.py
@@ -17,7 +17,8 @@ class DeepInfra(AsyncGeneratorProvider, ProviderModelMixin):
def get_models(cls):
if not cls.models:
url = 'https://api.deepinfra.com/models/featured'
- cls.models = requests.get(url).json()
+ models = requests.get(url).json()
+ cls.models = [model['model_name'] for model in models]
return cls.models
@classmethod