Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Automation] Regenerate SDK based on typespec-python branch snake-case-naming-optimization #36412

Closed
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
26 changes: 26 additions & 0 deletions aaaa-regenerate-sdk-result.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"succeed_to_regenerate": [
"azure-ai-inference",
"azure-mgmt-mongocluster",
"azure_ai_assets_v2024_04_01",
"azure-mgmt-edgezones",
"azure-purview-datamap",
"azure-communication-jobrouter",
"azure-ai-translation-document",
"azure-ai-translation-text",
"azure-ai-vision-face",
"azure-ai-contentsafety",
"azure-healthinsights-radiologyinsights",
"azure-ai-documentintelligence",
"azure-eventgrid",
"azure-ai-vision-imageanalysis",
"azure-schemaregistry",
"azure-mgmt-devopsinfrastructure"
],
"fail_to_regenerate": [
"azure-developer-devcenter",
"azure-mgmt-informaticadatamanagement",
"azure-communication-messages"
],
"time_to_regenerate": "2024-07-10 10:39:59.672072"
}
179 changes: 79 additions & 100 deletions eng/emitter-package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions eng/emitter-package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"main": "dist/src/index.js",
"dependencies": {
"@azure-tools/typespec-python": "0.25.0"
"@azure-tools/typespec-python": "/mnt/vss/_work/1/s/autorest.python/packages/typespec-python/azure-tools-typespec-python-0.25.0.tgz"
},
"devDependencies": {
"@azure-tools/typespec-autorest": "~0.43.0",
Expand All @@ -16,4 +16,4 @@
"@typespec/versioning": "~0.57.0",
"@typespec/xml": "~0.57.0"
}
}
}
16 changes: 9 additions & 7 deletions sdk/ai/azure-ai-inference/azure/ai/inference/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,25 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._patch import ChatCompletionsClient
from ._patch import EmbeddingsClient
from ._patch import ImageEmbeddingsClient
from ._client import ChatCompletionsClient
from ._client import EmbeddingsClient
from ._client import ImageEmbeddingsClient
from ._version import VERSION

__version__ = VERSION


from ._patch import load_client
try:
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"load_client",
"ChatCompletionsClient",
"EmbeddingsClient",
"ImageEmbeddingsClient",
]

__all__.extend([p for p in _patch_all if p not in __all__])

_patch_sdk()

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdk/ai/azure-ai-inference/azure/ai/inference/_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def load_client(
# TODO: Remove "completions" and "embedding" once Mistral Large and Cohere fixes their model type
if model_info.model_type in (_models.ModelType.CHAT, "completion"):
chat_completion_client = ChatCompletionsClient(endpoint, credential, **kwargs)
chat_completion_client._model_info = ( # pylint: disable=protected-access,attribute-defined-outside-init
chat_completion_client._model_info = ( # pylint: disable=protected-access,attribute-defined-outside-init
model_info
)
return chat_completion_client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ def _json_attemp(data):
# context otherwise.
_LOGGER.critical("Wasn't XML not JSON, failing")
raise DeserializationError("XML is invalid") from err
elif content_type.startswith("text/"):
return data_as_str
raise DeserializationError("Cannot deserialize content-type: {}".format(content_type))

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion sdk/ai/azure-ai-inference/azure/ai/inference/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0b3"
VERSION = "1.0.0b1"
16 changes: 9 additions & 7 deletions sdk/ai/azure-ai-inference/azure/ai/inference/aio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,22 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._patch import ChatCompletionsClient
from ._patch import EmbeddingsClient
from ._patch import ImageEmbeddingsClient
from ._client import ChatCompletionsClient
from ._client import EmbeddingsClient
from ._client import ImageEmbeddingsClient


from ._patch import load_client
try:
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"load_client",
"ChatCompletionsClient",
"EmbeddingsClient",
"ImageEmbeddingsClient",
]

__all__.extend([p for p in _patch_all if p not in __all__])

_patch_sdk()
Loading
Loading