Skip to content

Commit

Permalink
[Bugfix] Change the if condition for GPT-V to check USE_GPTV to fix n…
Browse files Browse the repository at this point in the history
…on-GPTV usage (#1060)

* Change the if

* Update tests configuration
  • Loading branch information
pamelafox authored Dec 13, 2023
1 parent 6392a8c commit cf97be4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ async def setup_clients():
query_speller=AZURE_SEARCH_QUERY_SPELLER,
)

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

Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ def mock_blob_container_client(monkeypatch):
"AZURE_OPENAI_SERVICE": "test-openai-service",
"AZURE_OPENAI_CHATGPT_DEPLOYMENT": "test-chatgpt",
"AZURE_OPENAI_EMB_DEPLOYMENT": "test-ada",
"USE_GPT4V": "true",
"AZURE_OPENAI_GPT4V_MODEL": "gpt-4",
"VISION_SECRET_NAME": "mysecret",
"VISION_ENDPOINT": "https://testvision.cognitiveservices.azure.com/",
Expand Down

0 comments on commit cf97be4

Please sign in to comment.