From 7fef83593a54fa3549683216243c4dbc1afc53b7 Mon Sep 17 00:00:00 2001 From: ochen1 <59662605+ochen1@users.noreply.github.com> Date: Sat, 13 Apr 2024 14:28:12 -0600 Subject: Add model alias for gpt-4-turbo-preview in OpenaiChat Provider --- g4f/Provider/needs_auth/OpenaiChat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'g4f/Provider') diff --git a/g4f/Provider/needs_auth/OpenaiChat.py b/g4f/Provider/needs_auth/OpenaiChat.py index ff3446ac..b3955c35 100644 --- a/g4f/Provider/needs_auth/OpenaiChat.py +++ b/g4f/Provider/needs_auth/OpenaiChat.py @@ -44,7 +44,7 @@ class OpenaiChat(AsyncGeneratorProvider, ProviderModelMixin): supports_system_message = True default_model = None models = ["gpt-3.5-turbo", "gpt-4", "gpt-4-gizmo"] - model_aliases = {"text-davinci-002-render-sha": "gpt-3.5-turbo", "": "gpt-3.5-turbo"} + model_aliases = {"text-davinci-002-render-sha": "gpt-3.5-turbo", "": "gpt-3.5-turbo", "gpt-4-turbo-preview": "gpt-4"} _api_key: str = None _headers: dict = None _cookies: Cookies = None @@ -784,4 +784,4 @@ class Response(): async def get_messages(self) -> list: messages = self._messages messages.append({"role": "assistant", "content": await self.message()}) - return messages \ No newline at end of file + return messages -- cgit v1.2.3