From 40ceb1c0e85d73ecc81e9552bc2ab4fb4928e5c6 Mon Sep 17 00:00:00 2001 From: nullstreak <139914347+nullstreak@users.noreply.github.com> Date: Tue, 30 Jan 2024 04:15:25 +0100 Subject: Fix DeepInfra: Model is not supported --- g4f/Provider/DeepInfra.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3