Skip to content

Commit 18f27e4

Browse files
author
SDKAuto
committed
CodeGen from PR 32103 in Azure/azure-rest-api-specs
Merge 1f152afbf84c6febe1f4447d284750f03c7f188f into fc2f4c6f6f8453c2eb58b6fb5ad8952d4c507971
1 parent 898a0be commit 18f27e4

38 files changed

+1257
-6782
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"commit": "023d3cfb7915c51b09b19a7bf9e30d1643cbd8b8",
3+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4+
"typespec_src": "specification/ai/ModelClient",
5+
"@azure-tools/typespec-python": "0.38.0"
6+
}

sdk/ai/azure-ai-inference/azure/ai/inference/__init__.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,32 @@
55
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._patch import ChatCompletionsClient
10-
from ._patch import EmbeddingsClient
11-
from ._patch import ImageEmbeddingsClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._client import ChatCompletionsClient # type: ignore
16+
from ._client import EmbeddingsClient # type: ignore
17+
from ._client import ImageEmbeddingsClient # type: ignore
1218
from ._version import VERSION
1319

1420
__version__ = VERSION
1521

16-
17-
from ._patch import load_client
22+
try:
23+
from ._patch import __all__ as _patch_all
24+
from ._patch import *
25+
except ImportError:
26+
_patch_all = []
1827
from ._patch import patch_sdk as _patch_sdk
1928

2029
__all__ = [
21-
"load_client",
2230
"ChatCompletionsClient",
2331
"EmbeddingsClient",
2432
"ImageEmbeddingsClient",
2533
]
26-
34+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2735

2836
_patch_sdk()

sdk/ai/azure-ai-inference/azure/ai/inference/_client.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,16 @@
2828
from ._serialization import Deserializer, Serializer
2929

3030
if TYPE_CHECKING:
31-
# pylint: disable=unused-import,ungrouped-imports
3231
from azure.core.credentials import TokenCredential
3332

3433

35-
class ChatCompletionsClient(ChatCompletionsClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword
34+
class ChatCompletionsClient(ChatCompletionsClientOperationsMixin):
3635
"""ChatCompletionsClient.
3736
3837
:param endpoint: Service host. Required.
3938
:type endpoint: str
4039
:param credential: Credential used to authenticate requests to the service. Is one of the
41-
following types: AzureKeyCredential, AzureKeyCredential, TokenCredential Required.
40+
following types: AzureKeyCredential, AzureKeyCredential, token credential Required.
4241
:type credential: ~azure.core.credentials.AzureKeyCredential or
4342
~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials.TokenCredential
4443
:keyword api_version: The API version to use for this operation. Default value is
@@ -110,13 +109,13 @@ def __exit__(self, *exc_details: Any) -> None:
110109
self._client.__exit__(*exc_details)
111110

112111

113-
class EmbeddingsClient(EmbeddingsClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword
112+
class EmbeddingsClient(EmbeddingsClientOperationsMixin):
114113
"""EmbeddingsClient.
115114
116115
:param endpoint: Service host. Required.
117116
:type endpoint: str
118117
:param credential: Credential used to authenticate requests to the service. Is one of the
119-
following types: AzureKeyCredential, AzureKeyCredential, TokenCredential Required.
118+
following types: AzureKeyCredential, AzureKeyCredential, token credential Required.
120119
:type credential: ~azure.core.credentials.AzureKeyCredential or
121120
~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials.TokenCredential
122121
:keyword api_version: The API version to use for this operation. Default value is
@@ -188,13 +187,13 @@ def __exit__(self, *exc_details: Any) -> None:
188187
self._client.__exit__(*exc_details)
189188

190189

191-
class ImageEmbeddingsClient(ImageEmbeddingsClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword
190+
class ImageEmbeddingsClient(ImageEmbeddingsClientOperationsMixin):
192191
"""ImageEmbeddingsClient.
193192
194193
:param endpoint: Service host. Required.
195194
:type endpoint: str
196195
:param credential: Credential used to authenticate requests to the service. Is one of the
197-
following types: AzureKeyCredential, AzureKeyCredential, TokenCredential Required.
196+
following types: AzureKeyCredential, AzureKeyCredential, token credential Required.
198197
:type credential: ~azure.core.credentials.AzureKeyCredential or
199198
~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials.TokenCredential
200199
:keyword api_version: The API version to use for this operation. Default value is

sdk/ai/azure-ai-inference/azure/ai/inference/_configuration.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
1817
from azure.core.credentials import TokenCredential
1918

2019

21-
class ChatCompletionsClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class ChatCompletionsClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for ChatCompletionsClient.
2322
2423
Note that all parameters used to create this instance are saved as instance
@@ -27,7 +26,7 @@ class ChatCompletionsClientConfiguration: # pylint: disable=too-many-instance-a
2726
:param endpoint: Service host. Required.
2827
:type endpoint: str
2928
:param credential: Credential used to authenticate requests to the service. Is one of the
30-
following types: AzureKeyCredential, AzureKeyCredential, TokenCredential Required.
29+
following types: AzureKeyCredential, AzureKeyCredential, token credential Required.
3130
:type credential: ~azure.core.credentials.AzureKeyCredential or
3231
~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials.TokenCredential
3332
:keyword api_version: The API version to use for this operation. Default value is
@@ -75,7 +74,7 @@ def _configure(self, **kwargs: Any) -> None:
7574
self.authentication_policy = self._infer_policy(**kwargs)
7675

7776

78-
class EmbeddingsClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
77+
class EmbeddingsClientConfiguration: # pylint: disable=too-many-instance-attributes
7978
"""Configuration for EmbeddingsClient.
8079
8180
Note that all parameters used to create this instance are saved as instance
@@ -84,7 +83,7 @@ class EmbeddingsClientConfiguration: # pylint: disable=too-many-instance-attrib
8483
:param endpoint: Service host. Required.
8584
:type endpoint: str
8685
:param credential: Credential used to authenticate requests to the service. Is one of the
87-
following types: AzureKeyCredential, AzureKeyCredential, TokenCredential Required.
86+
following types: AzureKeyCredential, AzureKeyCredential, token credential Required.
8887
:type credential: ~azure.core.credentials.AzureKeyCredential or
8988
~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials.TokenCredential
9089
:keyword api_version: The API version to use for this operation. Default value is
@@ -132,7 +131,7 @@ def _configure(self, **kwargs: Any) -> None:
132131
self.authentication_policy = self._infer_policy(**kwargs)
133132

134133

135-
class ImageEmbeddingsClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
134+
class ImageEmbeddingsClientConfiguration: # pylint: disable=too-many-instance-attributes
136135
"""Configuration for ImageEmbeddingsClient.
137136
138137
Note that all parameters used to create this instance are saved as instance
@@ -141,7 +140,7 @@ class ImageEmbeddingsClientConfiguration: # pylint: disable=too-many-instance-a
141140
:param endpoint: Service host. Required.
142141
:type endpoint: str
143142
:param credential: Credential used to authenticate requests to the service. Is one of the
144-
following types: AzureKeyCredential, AzureKeyCredential, TokenCredential Required.
143+
following types: AzureKeyCredential, AzureKeyCredential, token credential Required.
145144
:type credential: ~azure.core.credentials.AzureKeyCredential or
146145
~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials.TokenCredential
147146
:keyword api_version: The API version to use for this operation. Default value is

0 commit comments

Comments
 (0)