Skip to content

Commit

Permalink
Regenerate SDK based on typespec-python branch main
Browse files Browse the repository at this point in the history
  • Loading branch information
azure-sdk committed Aug 6, 2024
1 parent 842376a commit 949c87d
Show file tree
Hide file tree
Showing 327 changed files with 57,034 additions and 83,995 deletions.
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-contentsafety",
"azure-ai-documentintelligence",
"azure-ai-inference",
"azure-ai-translation-document",
"azure-ai-translation-text",
"azure-ai-vision-face",
"azure-ai-vision-imageanalysis",
"azure-communication-jobrouter",
"azure-communication-messages",
"azure-developer-devcenter",
"azure-eventgrid",
"azure-health-deidentification",
"azure-healthinsights-radiologyinsights",
"azure-mgmt-computefleet",
"azure-mgmt-devopsinfrastructure",
"azure-mgmt-edgezones",
"azure-mgmt-mongocluster",
"azure-purview-datamap",
"azure-schemaregistry",
"azure_ai_assets_v2024_04_01"
],
"fail_to_regenerate": [],
"time_to_regenerate": "2024-08-06 10:09:04.321744"
}
6 changes: 3 additions & 3 deletions eng/emitter-package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.27.1"
"@azure-tools/typespec-python": "/mnt/vss/_work/1/s/autorest.python/packages/typespec-python/azure-tools-typespec-python-0.27.1.tgz"
},
"devDependencies": {
"@azure-tools/typespec-autorest": "~0.44.1",
Expand All @@ -16,4 +16,4 @@
"@typespec/versioning": "~0.58.0",
"@typespec/xml": "~0.58.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()
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.
"""

result = {}
readonly_props = []
if exclude_readonly:
readonly_props = [p._rest_name for p in self._attr_to_rest_field.values() if _is_readonly(p)]
for k, v in self.items():
Expand Down
306 changes: 115 additions & 191 deletions sdk/ai/azure-ai-inference/azure/ai/inference/_operations/_operations.py

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions sdk/ai/azure-ai-inference/azure/ai/inference/_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def __init__(
seed: Optional[int] = None,
model: Optional[str] = None,
model_extras: Optional[Dict[str, Any]] = None,
**kwargs: Any
**kwargs: Any,
) -> None:

self._model_info: Optional[_models.ModelInfo] = None
Expand Down Expand Up @@ -714,7 +714,7 @@ def __init__(
input_type: Optional[Union[str, _models.EmbeddingInputType]] = None,
model: Optional[str] = None,
model_extras: Optional[Dict[str, Any]] = None,
**kwargs: Any
**kwargs: Any,
) -> None:

self._model_info: Optional[_models.ModelInfo] = None
Expand Down Expand Up @@ -998,7 +998,7 @@ def __init__(
input_type: Optional[Union[str, _models.EmbeddingInputType]] = None,
model: Optional[str] = None,
model_extras: Optional[Dict[str, Any]] = None,
**kwargs: Any
**kwargs: Any,
) -> None:

self._model_info: Optional[_models.ModelInfo] = None
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.0b4"
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

0 comments on commit 949c87d

Please sign in to comment.