Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,10 @@ async def get_azure_openai_client(
# If the connection uses API key authentication, we need to make another service call to get
# the connection with API key populated.
if connection.credentials.type == CredentialType.API_KEY:
connection = await self._outer_instance.connections._get_with_credentials( # pylint: disable=protected-access
name=connection_name, **kwargs
connection = (
await self._outer_instance.connections._get_with_credentials( # pylint: disable=protected-access
name=connection_name, **kwargs
)
)

logger.debug("[InferenceOperations.get_azure_openai_client] connection = %s", str(connection))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ async def get_connection_string(self) -> str:
if not connection_name:
raise ResourceNotFoundError("No Application Insights connection found.")

connection = await self._outer_instance.connections._get_with_credentials( # pylint: disable=protected-access
name=connection_name
connection = (
await self._outer_instance.connections._get_with_credentials( # pylint: disable=protected-access
name=connection_name
)
)

if isinstance(connection.credentials, ApiKeyCredentials):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ def test_evaluations_list(self, aiproject_endpoint):

@AIProjectPreparer()
@recorded_by_proxy
def test_evaluations_create_run(self, aiproject_endpoint):
def test_evaluations_create(self, aiproject_endpoint):
client = self.create_client(endpoint=aiproject_endpoint)
response = client.evaluations.create_run(
response = client.evaluations.create(
evaluation={
"data": "input_data",
"evaluators": {"str": {"id": "str", "dataMapping": {"str": "str"}, "initParams": {"str": {}}}},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ async def test_evaluations_list(self, aiproject_endpoint):

@AIProjectPreparer()
@recorded_by_proxy_async
async def test_evaluations_create_run(self, aiproject_endpoint):
async def test_evaluations_create(self, aiproject_endpoint):
client = self.create_async_client(endpoint=aiproject_endpoint)
response = await client.evaluations.create_run(
response = await client.evaluations.create(
evaluation={
"data": "input_data",
"evaluators": {"str": {"id": "str", "dataMapping": {"str": "str"}, "initParams": {"str": {}}}},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ def test_red_teams_list(self, aiproject_endpoint):

@AIProjectPreparer()
@recorded_by_proxy
def test_red_teams_create_run(self, aiproject_endpoint):
def test_red_teams_create(self, aiproject_endpoint):
client = self.create_client(endpoint=aiproject_endpoint)
response = client.red_teams.create_run(
response = client.red_teams.create(
red_team={
"attackStrategies": ["str"],
"id": "str",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ async def test_red_teams_list(self, aiproject_endpoint):

@AIProjectPreparer()
@recorded_by_proxy_async
async def test_red_teams_create_run(self, aiproject_endpoint):
async def test_red_teams_create(self, aiproject_endpoint):
client = self.create_async_client(endpoint=aiproject_endpoint)
response = await client.red_teams.create_run(
response = await client.red_teams.create(
red_team={
"attackStrategies": ["str"],
"id": "str",
Expand Down
1 change: 1 addition & 0 deletions sdk/ai/azure-ai-projects/tests/samples/test_samples.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: disable=line-too-long,useless-suppression
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
Expand Down
2 changes: 1 addition & 1 deletion sdk/ai/azure-ai-projects/tsp-location.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
directory: specification/ai/Azure.AI.Projects
commit: 3e0ddc7036c4d7bcb823dfb3398ad2e51b8e59dd
commit: 8de48d87b4a46f26917673d0457ef3662441d1a1
repo: Azure/azure-rest-api-specs
additionalDirectories:
Loading