From d0bb6d1d7181fe3ec36bba8a5b37487a41864274 Mon Sep 17 00:00:00 2001 From: "Michael B. Klein" Date: Mon, 20 May 2024 21:34:35 +0000 Subject: [PATCH 1/2] Fix expectation on failing test --- chat/test/helpers/test_metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chat/test/helpers/test_metrics.py b/chat/test/helpers/test_metrics.py index 34528851..4c65d0e2 100644 --- a/chat/test/helpers/test_metrics.py +++ b/chat/test/helpers/test_metrics.py @@ -51,7 +51,7 @@ def test_token_usage(self): "prompt": 302, "question": 15, "source_documents": 1, - "total": 350 + "total": 324 } self.assertEqual(result, expected_result) From 85ad56647b89037d244d250b4c8608f9ab9d1951 Mon Sep 17 00:00:00 2001 From: "Michael B. Klein" Date: Tue, 21 May 2024 17:33:33 +0000 Subject: [PATCH 2/2] Update OpenAI API version --- chat/src/event_config.py | 2 +- chat/test/test_event_config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chat/src/event_config.py b/chat/src/event_config.py index 7794c8e3..cb339455 100644 --- a/chat/src/event_config.py +++ b/chat/src/event_config.py @@ -21,7 +21,7 @@ MAX_K = 100 TEMPERATURE = 0.2 TEXT_KEY = "id" -VERSION = "2023-07-01-preview" +VERSION = "2024-02-01" @dataclass class EventConfig: diff --git a/chat/test/test_event_config.py b/chat/test/test_event_config.py index 1be422d5..625d854d 100644 --- a/chat/test/test_event_config.py +++ b/chat/test/test_event_config.py @@ -53,7 +53,7 @@ def test_attempt_override_without_superuser_status(self): "attributes": EventConfig.DEFAULT_ATTRIBUTES, "azure_endpoint": "https://test.openai.azure.com/", "k": 5, - "openai_api_version": "2023-07-01-preview", + "openai_api_version": "2024-02-01", "question": "test question", "ref": "test ref", "temperature": 0.2,