Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <[email protected]>
  • Loading branch information
codefromthecrypt committed Sep 25, 2024
1 parent 682f14b commit 19c2c3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/providers/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def default_azure_env(monkeypatch):
When running VCR tests for the first time or after deleting a cassette
recording, set required environment variables, so that real requests don't
fail. Subsequent runs use the recorded data, so don't them.
fail. Subsequent runs use the recorded data, so don't need them.
"""
if "AZURE_CHAT_COMPLETIONS_HOST_NAME" not in os.environ:
monkeypatch.setenv("AZURE_CHAT_COMPLETIONS_HOST_NAME", AZURE_ENDPOINT)
Expand Down Expand Up @@ -79,7 +79,7 @@ def scrub_request_url(request):
This scrubs sensitive request data in provider-specific way. Note that headers
are case-sensitive!
"""
if "openai" in request.uri:
if "openai.azure.com" in request.uri:
request.uri = re.sub(r"https://[^/]+", AZURE_ENDPOINT, request.uri)
request.uri = re.sub(r"/deployments/[^/]+", f"/deployments/{AZURE_DEPLOYMENT_NAME}", request.uri)
request.headers["host"] = AZURE_ENDPOINT.replace("https://", "")
Expand Down
2 changes: 1 addition & 1 deletion tests/providers/test_azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ def test_azure_complete_integration():
reply = complete(AzureProvider, AZURE_MODEL)

assert reply[0].content is not None
print("Complete content from Azure:", reply[0].content)
print("Completion content from Azure:", reply[0].content)

0 comments on commit 19c2c3b

Please sign in to comment.