From 88258c8198d726ad52ec95f875c46152482151b8 Mon Sep 17 00:00:00 2001 From: Krista Pratico Date: Wed, 20 Mar 2024 10:11:45 -0700 Subject: [PATCH] increase live test timeout + fixes for GA version --- .../azure-openai/tests/test_chat_completions.py | 14 ++++++++++---- .../tests/test_chat_completions_async.py | 14 ++++++++++---- sdk/openai/tests.yml | 1 + 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/sdk/openai/azure-openai/tests/test_chat_completions.py b/sdk/openai/azure-openai/tests/test_chat_completions.py index 25ee59cdae71..0b5cdda390d0 100644 --- a/sdk/openai/azure-openai/tests/test_chat_completions.py +++ b/sdk/openai/azure-openai/tests/test_chat_completions.py @@ -713,8 +713,11 @@ def test_chat_completion_byod(self, client, api_type, api_version, **kwargs): "type": "azure_search", "parameters": { "endpoint": os.environ[ENV_AZURE_OPENAI_SEARCH_ENDPOINT], - "key": os.environ[ENV_AZURE_OPENAI_SEARCH_KEY], - "index_name": os.environ[ENV_AZURE_OPENAI_SEARCH_INDEX] + "index_name": os.environ[ENV_AZURE_OPENAI_SEARCH_INDEX], + "authentication": { + "type": "api_key", + "key": os.environ[ENV_AZURE_OPENAI_SEARCH_KEY], + } } } ], @@ -749,8 +752,11 @@ def test_streamed_chat_completions_byod(self, client, api_type, api_version, **k "type": "azure_search", "parameters": { "endpoint": os.environ[ENV_AZURE_OPENAI_SEARCH_ENDPOINT], - "key": os.environ[ENV_AZURE_OPENAI_SEARCH_KEY], - "index_name": os.environ[ENV_AZURE_OPENAI_SEARCH_INDEX] + "index_name": os.environ[ENV_AZURE_OPENAI_SEARCH_INDEX], + "authentication": { + "type": "api_key", + "key": os.environ[ENV_AZURE_OPENAI_SEARCH_KEY], + } } } ], diff --git a/sdk/openai/azure-openai/tests/test_chat_completions_async.py b/sdk/openai/azure-openai/tests/test_chat_completions_async.py index 48ce2de817f2..2c16440b54d8 100644 --- a/sdk/openai/azure-openai/tests/test_chat_completions_async.py +++ b/sdk/openai/azure-openai/tests/test_chat_completions_async.py @@ -729,8 +729,11 @@ async def test_chat_completion_byod(self, client_async, api_type, api_version, * "type": "azure_search", "parameters": { "endpoint": os.environ[ENV_AZURE_OPENAI_SEARCH_ENDPOINT], - "key": os.environ[ENV_AZURE_OPENAI_SEARCH_KEY], - "index_name": os.environ[ENV_AZURE_OPENAI_SEARCH_INDEX] + "index_name": os.environ[ENV_AZURE_OPENAI_SEARCH_INDEX], + "authentication": { + "type": "api_key", + "key": os.environ[ENV_AZURE_OPENAI_SEARCH_KEY], + } } } ], @@ -766,8 +769,11 @@ async def test_streamed_chat_completions_byod(self, client_async, api_type, api_ "type": "azure_search", "parameters": { "endpoint": os.environ[ENV_AZURE_OPENAI_SEARCH_ENDPOINT], - "key": os.environ[ENV_AZURE_OPENAI_SEARCH_KEY], - "index_name": os.environ[ENV_AZURE_OPENAI_SEARCH_INDEX] + "index_name": os.environ[ENV_AZURE_OPENAI_SEARCH_INDEX], + "authentication": { + "type": "api_key", + "key": os.environ[ENV_AZURE_OPENAI_SEARCH_KEY], + } } } ], diff --git a/sdk/openai/tests.yml b/sdk/openai/tests.yml index d21c4d99c58a..ac2abcf02204 100644 --- a/sdk/openai/tests.yml +++ b/sdk/openai/tests.yml @@ -4,6 +4,7 @@ extends: template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: ServiceDirectory: openai + TestTimeoutInMinutes: 200 ToxTestEnv: optional MatrixFilters: - PythonVersion=3.11.*