Skip to content

Commit

Permalink
fix linting errors for module text llm
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytropolityka committed Aug 10, 2024
1 parent 14dcc7e commit 24b951c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ def _get_azure_openai_deployments() -> List[str]:
"api-key": os.environ["AZURE_OPENAI_API_KEY"]
}

models_response = requests.get(f"{base_url}/models?api-version=2023-03-15-preview", headers=headers)
models_response = requests.get(f"{base_url}/models?api-version=2023-03-15-preview", headers=headers, timeout=30)
models_data = models_response.json()["data"]
deployments_response = requests.get(f"{base_url}/deployments?api-version=2023-03-15-preview", headers=headers)
deployments_response = requests.get(f"{base_url}/deployments?api-version=2023-03-15-preview", headers=headers,
timeout=30)
deployments_data = deployments_response.json()["data"]

# Check if deployment["model"] is a substring of model["id"], i.e. "gpt-4o" is substring "gpt-4o-2024-05-13"
Expand Down

0 comments on commit 24b951c

Please sign in to comment.