From af90e166b0959b9783a8bedb0e92f37cf013d41a Mon Sep 17 00:00:00 2001 From: Kumaran Rajendhiran Date: Wed, 14 Aug 2024 13:01:11 +0530 Subject: [PATCH] Fix wrong package ecosystem in dependabot config (#23) * Fix wrong package ecosystem in dependabot config * Update openai models and tests --- .github/dependabot.yml | 2 +- fastagency/models/llms/openai.py | 17 +++++++++-------- tests/app/test_openai_extensively.py | 4 ++-- tests/models/llms/test_openai.py | 17 +++++++++-------- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 55007de24..e7c1bd064 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -16,7 +16,7 @@ updates: schedule: interval: "weekly" # Pnpm - - package-ecosystem: "pnpm" + - package-ecosystem: "npm" directory: "/auth_callout" schedule: interval: "weekly" diff --git a/fastagency/models/llms/openai.py b/fastagency/models/llms/openai.py index e5b522a59..3128af1a5 100644 --- a/fastagency/models/llms/openai.py +++ b/fastagency/models/llms/openai.py @@ -9,24 +9,25 @@ from ..registry import register OpenAIModels: TypeAlias = Literal[ + "gpt-4o-2024-08-06", "gpt-4-1106-preview", + "gpt-4-0613", + "gpt-4", + "chatgpt-4o-latest", "gpt-4-turbo-preview", - "gpt-4o-mini", "gpt-4-0125-preview", - "gpt-4o-mini-2024-07-18", "gpt-3.5-turbo", + "gpt-3.5-turbo-1106", + "gpt-4o-mini-2024-07-18", + "gpt-3.5-turbo-0125", + "gpt-4o-mini", "gpt-3.5-turbo-16k", "gpt-4-turbo-2024-04-09", - "gpt-3.5-turbo-0125", - "gpt-4-turbo", - "gpt-3.5-turbo-1106", "gpt-3.5-turbo-instruct-0914", "gpt-3.5-turbo-instruct", "gpt-4o", - "gpt-4-0613", "gpt-4o-2024-05-13", - "gpt-4", - "gpt-4o-2024-08-06", + "gpt-4-turbo", ] __all__ = [ diff --git a/tests/app/test_openai_extensively.py b/tests/app/test_openai_extensively.py index d41e04160..77d347a49 100644 --- a/tests/app/test_openai_extensively.py +++ b/tests/app/test_openai_extensively.py @@ -144,9 +144,9 @@ def test_validate_incorrect_model(self, model_dict: Dict[str, Any]) -> None: expected = { "type": "literal_error", "loc": ["model"], - "msg": "Input should be 'gpt-4-1106-preview', 'gpt-4-turbo-preview', 'gpt-4o-mini', 'gpt-4-0125-preview', 'gpt-4o-mini-2024-07-18', 'gpt-3.5-turbo', 'gpt-3.5-turbo-16k', 'gpt-4-turbo-2024-04-09', 'gpt-3.5-turbo-0125', 'gpt-4-turbo', 'gpt-3.5-turbo-1106', 'gpt-3.5-turbo-instruct-0914', 'gpt-3.5-turbo-instruct', 'gpt-4o', 'gpt-4-0613', 'gpt-4o-2024-05-13', 'gpt-4' or 'gpt-4o-2024-08-06'", + "msg": "Input should be 'gpt-4o-2024-08-06', 'gpt-4-1106-preview', 'gpt-4-0613', 'gpt-4', 'chatgpt-4o-latest', 'gpt-4-turbo-preview', 'gpt-4-0125-preview', 'gpt-3.5-turbo', 'gpt-3.5-turbo-1106', 'gpt-4o-mini-2024-07-18', 'gpt-3.5-turbo-0125', 'gpt-4o-mini', 'gpt-3.5-turbo-16k', 'gpt-4-turbo-2024-04-09', 'gpt-3.5-turbo-instruct-0914', 'gpt-3.5-turbo-instruct', 'gpt-4o', 'gpt-4o-2024-05-13' or 'gpt-4-turbo'", "ctx": { - "expected": "'gpt-4-1106-preview', 'gpt-4-turbo-preview', 'gpt-4o-mini', 'gpt-4-0125-preview', 'gpt-4o-mini-2024-07-18', 'gpt-3.5-turbo', 'gpt-3.5-turbo-16k', 'gpt-4-turbo-2024-04-09', 'gpt-3.5-turbo-0125', 'gpt-4-turbo', 'gpt-3.5-turbo-1106', 'gpt-3.5-turbo-instruct-0914', 'gpt-3.5-turbo-instruct', 'gpt-4o', 'gpt-4-0613', 'gpt-4o-2024-05-13', 'gpt-4' or 'gpt-4o-2024-08-06'" + "expected": "'gpt-4o-2024-08-06', 'gpt-4-1106-preview', 'gpt-4-0613', 'gpt-4', 'chatgpt-4o-latest', 'gpt-4-turbo-preview', 'gpt-4-0125-preview', 'gpt-3.5-turbo', 'gpt-3.5-turbo-1106', 'gpt-4o-mini-2024-07-18', 'gpt-3.5-turbo-0125', 'gpt-4o-mini', 'gpt-3.5-turbo-16k', 'gpt-4-turbo-2024-04-09', 'gpt-3.5-turbo-instruct-0914', 'gpt-3.5-turbo-instruct', 'gpt-4o', 'gpt-4o-2024-05-13' or 'gpt-4-turbo'" }, } # print(f"{msg_dict=}") diff --git a/tests/models/llms/test_openai.py b/tests/models/llms/test_openai.py index e97ac3220..5396816d4 100644 --- a/tests/models/llms/test_openai.py +++ b/tests/models/llms/test_openai.py @@ -118,24 +118,25 @@ def test_openai_schema(self) -> None: "default": "gpt-3.5-turbo", "description": "The model to use for the OpenAI API, e.g. 'gpt-3.5-turbo'", "enum": [ + "gpt-4o-2024-08-06", "gpt-4-1106-preview", + "gpt-4-0613", + "gpt-4", + "chatgpt-4o-latest", "gpt-4-turbo-preview", - "gpt-4o-mini", "gpt-4-0125-preview", - "gpt-4o-mini-2024-07-18", "gpt-3.5-turbo", + "gpt-3.5-turbo-1106", + "gpt-4o-mini-2024-07-18", + "gpt-3.5-turbo-0125", + "gpt-4o-mini", "gpt-3.5-turbo-16k", "gpt-4-turbo-2024-04-09", - "gpt-3.5-turbo-0125", - "gpt-4-turbo", - "gpt-3.5-turbo-1106", "gpt-3.5-turbo-instruct-0914", "gpt-3.5-turbo-instruct", "gpt-4o", - "gpt-4-0613", "gpt-4o-2024-05-13", - "gpt-4", - "gpt-4o-2024-08-06", + "gpt-4-turbo", ], "title": "Model", "type": "string",