From ac86e576d20b42a983c9c81dddd067d6e4d51cf4 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Wed, 28 Feb 2024 07:36:43 +0100 Subject: Add websocket support in OpenaiChat --- g4f/providers/base_provider.py | 2 +- g4f/providers/types.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'g4f/providers') diff --git a/g4f/providers/base_provider.py b/g4f/providers/base_provider.py index b8649ba5..17c45875 100644 --- a/g4f/providers/base_provider.py +++ b/g4f/providers/base_provider.py @@ -270,7 +270,7 @@ class ProviderModelMixin: @classmethod def get_model(cls, model: str) -> str: - if not model: + if not model and cls.default_model is not None: model = cls.default_model elif model in cls.model_aliases: model = cls.model_aliases[model] diff --git a/g4f/providers/types.py b/g4f/providers/types.py index 50080a96..67340958 100644 --- a/g4f/providers/types.py +++ b/g4f/providers/types.py @@ -26,6 +26,7 @@ class BaseProvider(ABC): supports_gpt_35_turbo: bool = False supports_gpt_4: bool = False supports_message_history: bool = False + supports_system_message: bool = False params: str @classmethod -- cgit v1.2.3