Skip to content

Commit cf97be4

Browse files
authored
[Bugfix] Change the if condition for GPT-V to check USE_GPTV to fix non-GPTV usage (#1060)
* Change the if * Update tests configuration
1 parent 6392a8c commit cf97be4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/backend/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ async def setup_clients():
328328
query_speller=AZURE_SEARCH_QUERY_SPELLER,
329329
)
330330

331-
if AZURE_OPENAI_GPT4V_MODEL:
331+
if USE_GPT4V:
332332
if vision_key is None:
333333
raise ValueError("Vision key must be set (in Key Vault) to use the vision approach.")
334334

tests/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ def mock_blob_container_client(monkeypatch):
235235
"AZURE_OPENAI_SERVICE": "test-openai-service",
236236
"AZURE_OPENAI_CHATGPT_DEPLOYMENT": "test-chatgpt",
237237
"AZURE_OPENAI_EMB_DEPLOYMENT": "test-ada",
238+
"USE_GPT4V": "true",
238239
"AZURE_OPENAI_GPT4V_MODEL": "gpt-4",
239240
"VISION_SECRET_NAME": "mysecret",
240241
"VISION_ENDPOINT": "https://testvision.cognitiveservices.azure.com/",

0 commit comments

Comments
 (0)