diff options
author | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-04-21 15:15:55 +0200 |
---|---|---|
committer | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-04-21 15:15:55 +0200 |
commit | a26421bcd8b8580650fa05b3fb4f8fdfa0ef9921 (patch) | |
tree | b1c7ff275c54682e29f89f07638b8fdd1743e0e1 /g4f/providers/base_provider.py | |
parent | Add MissingRequirementsError to You (diff) | |
download | gpt4free-a26421bcd8b8580650fa05b3fb4f8fdfa0ef9921.tar gpt4free-a26421bcd8b8580650fa05b3fb4f8fdfa0ef9921.tar.gz gpt4free-a26421bcd8b8580650fa05b3fb4f8fdfa0ef9921.tar.bz2 gpt4free-a26421bcd8b8580650fa05b3fb4f8fdfa0ef9921.tar.lz gpt4free-a26421bcd8b8580650fa05b3fb4f8fdfa0ef9921.tar.xz gpt4free-a26421bcd8b8580650fa05b3fb4f8fdfa0ef9921.tar.zst gpt4free-a26421bcd8b8580650fa05b3fb4f8fdfa0ef9921.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/providers/base_provider.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/g4f/providers/base_provider.py b/g4f/providers/base_provider.py index 685a6f98..5624c9e1 100644 --- a/g4f/providers/base_provider.py +++ b/g4f/providers/base_provider.py @@ -271,13 +271,13 @@ class AsyncGeneratorProvider(AsyncProvider): raise NotImplementedError() class ProviderModelMixin: - default_model: str + default_model: str = None models: list[str] = [] model_aliases: dict[str, str] = {} @classmethod def get_models(cls) -> list[str]: - if not cls.models: + if not cls.models and cls.default_model is not None: return [cls.default_model] return cls.models |