diff options
author | kqlio67 <kqlio67@users.noreply.github.com> | 2024-10-19 11:56:43 +0200 |
---|---|---|
committer | kqlio67 <kqlio67@users.noreply.github.com> | 2024-10-19 11:56:43 +0200 |
commit | fda90aa8f5ccea22ced86937b1ac24c55835537a (patch) | |
tree | 222a8836fa16bafef43a60a9898da2cd5880522b /g4f/gui/server/api.py | |
parent | refactor(etc/tool/create_provider.py): enhance provider template and functionality (diff) | |
download | gpt4free-fda90aa8f5ccea22ced86937b1ac24c55835537a.tar gpt4free-fda90aa8f5ccea22ced86937b1ac24c55835537a.tar.gz gpt4free-fda90aa8f5ccea22ced86937b1ac24c55835537a.tar.bz2 gpt4free-fda90aa8f5ccea22ced86937b1ac24c55835537a.tar.lz gpt4free-fda90aa8f5ccea22ced86937b1ac24c55835537a.tar.xz gpt4free-fda90aa8f5ccea22ced86937b1ac24c55835537a.tar.zst gpt4free-fda90aa8f5ccea22ced86937b1ac24c55835537a.zip |
Diffstat (limited to 'g4f/gui/server/api.py')
-rw-r--r-- | g4f/gui/server/api.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/g4f/gui/server/api.py b/g4f/gui/server/api.py index 3da0fe17..64b84767 100644 --- a/g4f/gui/server/api.py +++ b/g4f/gui/server/api.py @@ -43,13 +43,8 @@ class Api(): provider: ProviderType = __map__[provider] if issubclass(provider, ProviderModelMixin): return [{"model": model, "default": model == provider.default_model} for model in provider.get_models()] - elif provider.supports_gpt_35_turbo or provider.supports_gpt_4: - return [ - *([{"model": "gpt-4", "default": not provider.supports_gpt_4}] if provider.supports_gpt_4 else []), - *([{"model": "gpt-3.5-turbo", "default": not provider.supports_gpt_4}] if provider.supports_gpt_35_turbo else []) - ] else: - return []; + return [] @staticmethod def get_image_models() -> list[dict]: @@ -245,4 +240,4 @@ def get_error_message(exception: Exception) -> str: provider = get_last_provider() if provider is None: return message - return f"{provider.__name__}: {message}"
\ No newline at end of file + return f"{provider.__name__}: {message}" |