Skip to content

Commit

Permalink
Merge pull request #1835 from ochen1/patch-1
Browse files Browse the repository at this point in the history
Add model alias for gpt-4-turbo-preview in OpenaiChat Provider
  • Loading branch information
hlohaus authored Apr 14, 2024
2 parents 46dcf08 + 7fef835 commit fc33573
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions g4f/Provider/needs_auth/OpenaiChat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -784,4 +784,4 @@ async def create_variant(self, **kwargs) -> Response:
async def get_messages(self) -> list:
messages = self._messages
messages.append({"role": "assistant", "content": await self.message()})
return messages
return messages

0 comments on commit fc33573

Please sign in to comment.