diff --git a/sdk/ai/azure-ai-projects/apiview-properties.json b/sdk/ai/azure-ai-projects/apiview-properties.json index 2d85fdfedb62..9c11df0bd317 100644 --- a/sdk/ai/azure-ai-projects/apiview-properties.json +++ b/sdk/ai/azure-ai-projects/apiview-properties.json @@ -50,8 +50,8 @@ "azure.ai.projects.aio.operations.EvaluationsOperations.get": "Azure.AI.Projects.Evaluations.get", "azure.ai.projects.operations.EvaluationsOperations.list": "Azure.AI.Projects.Evaluations.list", "azure.ai.projects.aio.operations.EvaluationsOperations.list": "Azure.AI.Projects.Evaluations.list", - "azure.ai.projects.operations.EvaluationsOperations.create_run": "Azure.AI.Projects.Evaluations.createRun", - "azure.ai.projects.aio.operations.EvaluationsOperations.create_run": "Azure.AI.Projects.Evaluations.createRun", + "azure.ai.projects.operations.EvaluationsOperations.create": "Azure.AI.Projects.Evaluations.create", + "azure.ai.projects.aio.operations.EvaluationsOperations.create": "Azure.AI.Projects.Evaluations.create", "azure.ai.projects.operations.EvaluationsOperations.create_agent_evaluation": "Azure.AI.Projects.Evaluations.createAgentEvaluation", "azure.ai.projects.aio.operations.EvaluationsOperations.create_agent_evaluation": "Azure.AI.Projects.Evaluations.createAgentEvaluation", "azure.ai.projects.operations.DatasetsOperations.list_versions": "Azure.AI.Projects.ServicePatterns.Datasets.listVersions", @@ -86,7 +86,7 @@ "azure.ai.projects.aio.operations.RedTeamsOperations.get": "Azure.AI.Projects.RedTeams.get", "azure.ai.projects.operations.RedTeamsOperations.list": "Azure.AI.Projects.RedTeams.list", "azure.ai.projects.aio.operations.RedTeamsOperations.list": "Azure.AI.Projects.RedTeams.list", - "azure.ai.projects.operations.RedTeamsOperations.create_run": "Azure.AI.Projects.RedTeams.createRun", - "azure.ai.projects.aio.operations.RedTeamsOperations.create_run": "Azure.AI.Projects.RedTeams.createRun" + "azure.ai.projects.operations.RedTeamsOperations.create": "Azure.AI.Projects.RedTeams.create", + "azure.ai.projects.aio.operations.RedTeamsOperations.create": "Azure.AI.Projects.RedTeams.create" } } \ No newline at end of file diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/_patch_prompts.py b/sdk/ai/azure-ai-projects/azure/ai/projects/_patch_prompts.py index 1f30ce2470b9..9553f1684924 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/_patch_prompts.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/_patch_prompts.py @@ -18,6 +18,7 @@ if TYPE_CHECKING: from prompty import Prompty # type: ignore[import] + class PromptTemplate: """A helper class which takes variant of inputs, e.g. Prompty format or string, and returns the parsed prompt in an array. Prompty library is required to use this class (`pip install prompty`). diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/_patch.py b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/_patch.py index 61615acd0335..533e9e00191f 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/_patch.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/_patch.py @@ -17,6 +17,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.ai.agents.aio import AgentsClient + class AIProjectClient(AIProjectClientGenerated): # pylint: disable=too-many-instance-attributes """AIProjectClient. diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_operations.py b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_operations.py index e09781bf9f30..3403335e6a7c 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_operations.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -48,7 +48,7 @@ build_deployments_get_request, build_deployments_list_request, build_evaluations_create_agent_evaluation_request, - build_evaluations_create_run_request, + build_evaluations_create_request, build_evaluations_get_request, build_evaluations_list_request, build_indexes_create_or_update_request, @@ -56,7 +56,7 @@ build_indexes_get_request, build_indexes_list_request, build_indexes_list_versions_request, - build_red_teams_create_run_request, + build_red_teams_create_request, build_red_teams_get_request, build_red_teams_list_request, ) @@ -525,7 +525,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @overload - async def create_run( + async def create( self, evaluation: _models.Evaluation, *, content_type: str = "application/json", **kwargs: Any ) -> _models.Evaluation: """Creates an evaluation run. @@ -541,7 +541,7 @@ async def create_run( """ @overload - async def create_run( + async def create( self, evaluation: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.Evaluation: """Creates an evaluation run. @@ -557,7 +557,7 @@ async def create_run( """ @overload - async def create_run( + async def create( self, evaluation: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.Evaluation: """Creates an evaluation run. @@ -577,9 +577,7 @@ async def create_run( method_added_on="2025-05-15-preview", params_added_on={"2025-05-15-preview": ["api_version", "content_type", "accept"]}, ) - async def create_run( - self, evaluation: Union[_models.Evaluation, JSON, IO[bytes]], **kwargs: Any - ) -> _models.Evaluation: + async def create(self, evaluation: Union[_models.Evaluation, JSON, IO[bytes]], **kwargs: Any) -> _models.Evaluation: """Creates an evaluation run. :param evaluation: Evaluation to be run. Is one of the following types: Evaluation, JSON, @@ -610,7 +608,7 @@ async def create_run( else: _content = json.dumps(evaluation, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_evaluations_create_run_request( + _request = build_evaluations_create_request( content_type=content_type, api_version=self._config.api_version, content=_content, @@ -2271,7 +2269,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @overload - async def create_run( + async def create( self, red_team: _models.RedTeam, *, content_type: str = "application/json", **kwargs: Any ) -> _models.RedTeam: """Creates a redteam run. @@ -2287,9 +2285,7 @@ async def create_run( """ @overload - async def create_run( - self, red_team: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.RedTeam: + async def create(self, red_team: JSON, *, content_type: str = "application/json", **kwargs: Any) -> _models.RedTeam: """Creates a redteam run. :param red_team: Redteam to be run. Required. @@ -2303,7 +2299,7 @@ async def create_run( """ @overload - async def create_run( + async def create( self, red_team: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.RedTeam: """Creates a redteam run. @@ -2323,7 +2319,7 @@ async def create_run( method_added_on="2025-05-15-preview", params_added_on={"2025-05-15-preview": ["api_version", "content_type", "accept"]}, ) - async def create_run(self, red_team: Union[_models.RedTeam, JSON, IO[bytes]], **kwargs: Any) -> _models.RedTeam: + async def create(self, red_team: Union[_models.RedTeam, JSON, IO[bytes]], **kwargs: Any) -> _models.RedTeam: """Creates a redteam run. :param red_team: Redteam to be run. Is one of the following types: RedTeam, JSON, IO[bytes] @@ -2354,7 +2350,7 @@ async def create_run(self, red_team: Union[_models.RedTeam, JSON, IO[bytes]], ** else: _content = json.dumps(red_team, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_red_teams_create_run_request( + _request = build_red_teams_create_request( content_type=content_type, api_version=self._config.api_version, content=_content, diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py b/sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py index 6d676f8bb51d..7f3b51b50689 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py @@ -549,7 +549,8 @@ class BlobReference(_Model): """Blob reference details. :ivar blob_uri: Blob URI path for client to upload data. Example: - ``https://blob.windows.core.net/Container/Path``. Required. + `https://blob.windows.core.net/Container/Path `_. + Required. :vartype blob_uri: str :ivar storage_account_arm_id: ARM ID of the storage account to use. Required. :vartype storage_account_arm_id: str @@ -558,7 +559,8 @@ class BlobReference(_Model): """ blob_uri: str = rest_field(name="blobUri", visibility=["read", "create", "update", "delete", "query"]) - """Blob URI path for client to upload data. Example: ``https://blob.windows.core.net/Container/Path``. Required.""" + """Blob URI path for client to upload data. Example: `https://blob.windows.core.net/Container/Path + `_. Required.""" storage_account_arm_id: str = rest_field( name="storageAccountArmId", visibility=["read", "create", "update", "delete", "query"] ) @@ -719,8 +721,7 @@ class DatasetVersion(_Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: FileDatasetVersion, FolderDatasetVersion - :ivar data_uri: [Required] Uri of the data. Example: - `https://go.microsoft.com/fwlink/?linkid=2202330 + :ivar data_uri: URI of the data. Example: `https://go.microsoft.com/fwlink/?linkid=2202330 `_. Required. :vartype data_uri: str :ivar type: Dataset type. Required. Known values are: "uri_file" and "uri_folder". @@ -742,7 +743,7 @@ class DatasetVersion(_Model): __mapping__: Dict[str, _Model] = {} data_uri: str = rest_field(name="dataUri", visibility=["read", "create"]) - """[Required] Uri of the data. Example: `https://go.microsoft.com/fwlink/?linkid=2202330 + """URI of the data. Example: `https://go.microsoft.com/fwlink/?linkid=2202330 `_. Required.""" type: str = rest_discriminator(name="type", visibility=["read", "create", "update", "delete", "query"]) """Dataset type. Required. Known values are: \"uri_file\" and \"uri_folder\".""" @@ -994,8 +995,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class FileDatasetVersion(DatasetVersion, discriminator="uri_file"): """FileDatasetVersion Definition. - :ivar data_uri: [Required] Uri of the data. Example: - `https://go.microsoft.com/fwlink/?linkid=2202330 + :ivar data_uri: URI of the data. Example: `https://go.microsoft.com/fwlink/?linkid=2202330 `_. Required. :vartype data_uri: str :ivar is_reference: Indicates if dataset is reference only or managed by dataset service. If @@ -1041,8 +1041,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class FolderDatasetVersion(DatasetVersion, discriminator="uri_folder"): """FileDatasetVersion Definition. - :ivar data_uri: [Required] Uri of the data. Example: - `https://go.microsoft.com/fwlink/?linkid=2202330 + :ivar data_uri: URI of the data. Example: `https://go.microsoft.com/fwlink/?linkid=2202330 `_. Required. :vartype data_uri: str :ivar is_reference: Indicates if dataset is reference only or managed by dataset service. If @@ -1327,8 +1326,8 @@ class PendingUploadResponse(_Model): :ivar version: Version of asset to be created if user did not specify version when initially creating upload. :vartype version: str - :ivar pending_upload_type: TemporaryBlobReference is the only supported type. Required. Blob - Reference is the only supported type. + :ivar pending_upload_type: BlobReference is the only supported type. Required. Blob Reference + is the only supported type. :vartype pending_upload_type: str or ~azure.ai.projects.models.BLOB_REFERENCE """ @@ -1345,8 +1344,7 @@ class PendingUploadResponse(_Model): pending_upload_type: Literal[PendingUploadType.BLOB_REFERENCE] = rest_field( name="pendingUploadType", visibility=["read", "create", "update", "delete", "query"] ) - """TemporaryBlobReference is the only supported type. Required. Blob Reference is the only - supported type.""" + """BlobReference is the only supported type. Required. Blob Reference is the only supported type.""" @overload def __init__( @@ -1372,8 +1370,8 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class RedTeam(_Model): """Red team details. - :ivar id: Identifier of the red team. Required. - :vartype id: str + :ivar name: Identifier of the red team. Required. + :vartype name: str :ivar scan_name: Name of the red-team scan. :vartype scan_name: str :ivar num_turns: Number of simulation rounds. Required. @@ -1400,7 +1398,7 @@ class RedTeam(_Model): :vartype target_config: ~azure.ai.projects.models.TargetConfig """ - id: str = rest_field(visibility=["read"]) + name: str = rest_field(name="id", visibility=["read"]) """Identifier of the red team. Required.""" scan_name: Optional[str] = rest_field(name="scanName", visibility=["read", "create", "update", "delete", "query"]) """Name of the red-team scan.""" diff --git a/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_operations.py b/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_operations.py index f23faf099801..8369d6fa8821 100644 --- a/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_operations.py +++ b/sdk/ai/azure-ai-projects/azure/ai/projects/operations/_operations.py @@ -181,7 +181,7 @@ def build_evaluations_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_evaluations_create_run_request(**kwargs: Any) -> HttpRequest: +def build_evaluations_create_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -657,7 +657,7 @@ def build_red_teams_list_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_red_teams_create_run_request(**kwargs: Any) -> HttpRequest: +def build_red_teams_create_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) @@ -1137,7 +1137,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) @overload - def create_run( + def create( self, evaluation: _models.Evaluation, *, content_type: str = "application/json", **kwargs: Any ) -> _models.Evaluation: """Creates an evaluation run. @@ -1153,9 +1153,7 @@ def create_run( """ @overload - def create_run( - self, evaluation: JSON, *, content_type: str = "application/json", **kwargs: Any - ) -> _models.Evaluation: + def create(self, evaluation: JSON, *, content_type: str = "application/json", **kwargs: Any) -> _models.Evaluation: """Creates an evaluation run. :param evaluation: Evaluation to be run. Required. @@ -1169,7 +1167,7 @@ def create_run( """ @overload - def create_run( + def create( self, evaluation: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.Evaluation: """Creates an evaluation run. @@ -1189,7 +1187,7 @@ def create_run( method_added_on="2025-05-15-preview", params_added_on={"2025-05-15-preview": ["api_version", "content_type", "accept"]}, ) - def create_run(self, evaluation: Union[_models.Evaluation, JSON, IO[bytes]], **kwargs: Any) -> _models.Evaluation: + def create(self, evaluation: Union[_models.Evaluation, JSON, IO[bytes]], **kwargs: Any) -> _models.Evaluation: """Creates an evaluation run. :param evaluation: Evaluation to be run. Is one of the following types: Evaluation, JSON, @@ -1220,7 +1218,7 @@ def create_run(self, evaluation: Union[_models.Evaluation, JSON, IO[bytes]], **k else: _content = json.dumps(evaluation, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_evaluations_create_run_request( + _request = build_evaluations_create_request( content_type=content_type, api_version=self._config.api_version, content=_content, @@ -2877,7 +2875,7 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) @overload - def create_run( + def create( self, red_team: _models.RedTeam, *, content_type: str = "application/json", **kwargs: Any ) -> _models.RedTeam: """Creates a redteam run. @@ -2893,7 +2891,7 @@ def create_run( """ @overload - def create_run(self, red_team: JSON, *, content_type: str = "application/json", **kwargs: Any) -> _models.RedTeam: + def create(self, red_team: JSON, *, content_type: str = "application/json", **kwargs: Any) -> _models.RedTeam: """Creates a redteam run. :param red_team: Redteam to be run. Required. @@ -2907,9 +2905,7 @@ def create_run(self, red_team: JSON, *, content_type: str = "application/json", """ @overload - def create_run( - self, red_team: IO[bytes], *, content_type: str = "application/json", **kwargs: Any - ) -> _models.RedTeam: + def create(self, red_team: IO[bytes], *, content_type: str = "application/json", **kwargs: Any) -> _models.RedTeam: """Creates a redteam run. :param red_team: Redteam to be run. Required. @@ -2927,7 +2923,7 @@ def create_run( method_added_on="2025-05-15-preview", params_added_on={"2025-05-15-preview": ["api_version", "content_type", "accept"]}, ) - def create_run(self, red_team: Union[_models.RedTeam, JSON, IO[bytes]], **kwargs: Any) -> _models.RedTeam: + def create(self, red_team: Union[_models.RedTeam, JSON, IO[bytes]], **kwargs: Any) -> _models.RedTeam: """Creates a redteam run. :param red_team: Redteam to be run. Is one of the following types: RedTeam, JSON, IO[bytes] @@ -2958,7 +2954,7 @@ def create_run(self, red_team: Union[_models.RedTeam, JSON, IO[bytes]], **kwargs else: _content = json.dumps(red_team, cls=SdkJSONEncoder, exclude_readonly=True) # type: ignore - _request = build_red_teams_create_run_request( + _request = build_red_teams_create_request( content_type=content_type, api_version=self._config.api_version, content=_content, diff --git a/sdk/ai/azure-ai-projects/samples/connections/sample_connections_async.py b/sdk/ai/azure-ai-projects/samples/connections/sample_connections_async.py index ad56e70cfba7..0770942ebadd 100644 --- a/sdk/ai/azure-ai-projects/samples/connections/sample_connections_async.py +++ b/sdk/ai/azure-ai-projects/samples/connections/sample_connections_async.py @@ -43,7 +43,9 @@ async def sample_connections_async() -> None: async for connection in project_client.connections.list(): print(connection) - print("List the properties of all connections of a particular type (in this case, Azure OpenAI connections):") + print( + "List the properties of all connections of a particular type (in this case, Azure OpenAI connections):" + ) async for connection in project_client.connections.list( connection_type=ConnectionType.AZURE_OPEN_AI, ): diff --git a/sdk/ai/azure-ai-projects/samples/evaluation/sample_evaluations.py b/sdk/ai/azure-ai-projects/samples/evaluation/sample_evaluations.py index 4d8cece891b8..5b4adc95253b 100644 --- a/sdk/ai/azure-ai-projects/samples/evaluation/sample_evaluations.py +++ b/sdk/ai/azure-ai-projects/samples/evaluation/sample_evaluations.py @@ -38,7 +38,7 @@ load_dotenv() endpoint = os.environ["PROJECT_ENDPOINT"] -#dataset_name = os.environ["DATASET_NAME"] +# dataset_name = os.environ["DATASET_NAME"] with DefaultAzureCredential(exclude_interactive_browser_credential=False) as credential: @@ -70,12 +70,12 @@ data_mapping={ "query": "${data.query}", "response": "${data.response}", - } + }, ), }, ) - evaluation_response: Evaluation = project_client.evaluations.create_run(evaluation) + evaluation_response: Evaluation = project_client.evaluations.create(evaluation) print(evaluation_response) print("Get evaluation") diff --git a/sdk/ai/azure-ai-projects/samples/evaluation/sample_evaluations_async.py b/sdk/ai/azure-ai-projects/samples/evaluation/sample_evaluations_async.py index f5da4e29e498..a02eb1231e3f 100644 --- a/sdk/ai/azure-ai-projects/samples/evaluation/sample_evaluations_async.py +++ b/sdk/ai/azure-ai-projects/samples/evaluation/sample_evaluations_async.py @@ -31,7 +31,7 @@ InputDataset, EvaluatorConfiguration, EvaluatorIds, - #DatasetVersion, + # DatasetVersion, ) from dotenv import load_dotenv @@ -40,7 +40,7 @@ async def sample_evaluations_async() -> None: endpoint = os.environ["PROJECT_ENDPOINT"] - #dataset_name = os.environ["DATASET_NAME"] + # dataset_name = os.environ["DATASET_NAME"] async with DefaultAzureCredential() as credential: @@ -73,7 +73,7 @@ async def sample_evaluations_async() -> None: }, ) - evaluation_response: Evaluation = await project_client.evaluations.create_run(evaluation) + evaluation_response: Evaluation = await project_client.evaluations.create(evaluation) print(evaluation_response) print("Get evaluation") @@ -93,4 +93,4 @@ async def main(): if __name__ == "__main__": - asyncio.run(main()) \ No newline at end of file + asyncio.run(main()) diff --git a/sdk/ai/azure-ai-projects/samples/indexes/sample_indexes.py b/sdk/ai/azure-ai-projects/samples/indexes/sample_indexes.py index 3b2da7416a69..ab74b8f5a6d8 100644 --- a/sdk/ai/azure-ai-projects/samples/indexes/sample_indexes.py +++ b/sdk/ai/azure-ai-projects/samples/indexes/sample_indexes.py @@ -41,7 +41,9 @@ with AIProjectClient(endpoint=endpoint, credential=credential) as project_client: # [START indexes_sample] - print(f"Create Index `{index_name}` with version `{index_version}`, referencing an existing AI Search resource:") + print( + f"Create Index `{index_name}` with version `{index_version}`, referencing an existing AI Search resource:" + ) index = project_client.indexes.create_or_update( name=index_name, version=index_version, diff --git a/sdk/ai/azure-ai-projects/samples/indexes/sample_indexes_async.py b/sdk/ai/azure-ai-projects/samples/indexes/sample_indexes_async.py index 88cfc5b8f644..bec7dfbe98c1 100644 --- a/sdk/ai/azure-ai-projects/samples/indexes/sample_indexes_async.py +++ b/sdk/ai/azure-ai-projects/samples/indexes/sample_indexes_async.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. diff --git a/sdk/ai/azure-ai-projects/samples/inference/sample_image_embeddings_with_azure_ai_inference_client.py b/sdk/ai/azure-ai-projects/samples/inference/sample_image_embeddings_with_azure_ai_inference_client.py index 6362eb58eb7c..97473a51d98b 100644 --- a/sdk/ai/azure-ai-projects/samples/inference/sample_image_embeddings_with_azure_ai_inference_client.py +++ b/sdk/ai/azure-ai-projects/samples/inference/sample_image_embeddings_with_azure_ai_inference_client.py @@ -38,7 +38,8 @@ with project_client.inference.get_image_embeddings_client() as client: response = client.embed( - model=model_deployment_name, input=[ImageEmbeddingInput.load(image_file="sample1.png", image_format="png")] + model=model_deployment_name, + input=[ImageEmbeddingInput.load(image_file="sample1.png", image_format="png")], ) for item in response.data: diff --git a/sdk/ai/azure-ai-projects/samples/inference/sample_text_embeddings_with_azure_ai_inference_client.py b/sdk/ai/azure-ai-projects/samples/inference/sample_text_embeddings_with_azure_ai_inference_client.py index 997d61de441a..d2d2229c0680 100644 --- a/sdk/ai/azure-ai-projects/samples/inference/sample_text_embeddings_with_azure_ai_inference_client.py +++ b/sdk/ai/azure-ai-projects/samples/inference/sample_text_embeddings_with_azure_ai_inference_client.py @@ -36,7 +36,9 @@ with project_client.inference.get_embeddings_client() as client: - response = client.embed(model=model_deployment_name, input=["first phrase", "second phrase", "third phrase"]) + response = client.embed( + model=model_deployment_name, input=["first phrase", "second phrase", "third phrase"] + ) for item in response.data: length = len(item.embedding) diff --git a/sdk/ai/azure-ai-projects/tsp-location.yaml b/sdk/ai/azure-ai-projects/tsp-location.yaml index 2297fa8526e6..29abf931aaf0 100644 --- a/sdk/ai/azure-ai-projects/tsp-location.yaml +++ b/sdk/ai/azure-ai-projects/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/ai/Azure.AI.Projects -commit: 2b91ae94018e25928f677fcc7c5f05c164ea48a5 +commit: 3e0ddc7036c4d7bcb823dfb3398ad2e51b8e59dd repo: Azure/azure-rest-api-specs additionalDirectories: