Skip to content

Commit

Permalink
CodeGen from PR 32081 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 3d1d279e04137e17a25c199ce8a948b9758cc63f into cba2d23614eab1c481fb0ff397b3eef4773865d2
  • Loading branch information
SDKAuto committed Jan 22, 2025
1 parent 523fe37 commit dc49970
Show file tree
Hide file tree
Showing 29 changed files with 331 additions and 6,710 deletions.
6 changes: 6 additions & 0 deletions sdk/ai/azure-ai-inference/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"commit": "7dca60dfb7fda9a5e4aaeb4494db564b992c5c43",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/ai/ModelClient",
"@azure-tools/typespec-python": "0.38.1"
}
12 changes: 6 additions & 6 deletions sdk/ai/azure-ai-inference/azure/ai/inference/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class ChatCompletionsClient(ChatCompletionsClientOperationsMixin):
:param endpoint: Service host. Required.
:type endpoint: str
:param credential: Credential used to authenticate requests to the service. Is one of the
following types: AzureKeyCredential, AzureKeyCredential, TokenCredential Required.
:param credential: Credential used to authenticate requests to the service. Is either a key
credential type or a token credential type. Required.
:type credential: ~azure.core.credentials.AzureKeyCredential or
~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials.TokenCredential
:keyword api_version: The API version to use for this operation. Default value is
Expand Down Expand Up @@ -114,8 +114,8 @@ class EmbeddingsClient(EmbeddingsClientOperationsMixin):
:param endpoint: Service host. Required.
:type endpoint: str
:param credential: Credential used to authenticate requests to the service. Is one of the
following types: AzureKeyCredential, AzureKeyCredential, TokenCredential Required.
:param credential: Credential used to authenticate requests to the service. Is either a key
credential type or a token credential type. Required.
:type credential: ~azure.core.credentials.AzureKeyCredential or
~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials.TokenCredential
:keyword api_version: The API version to use for this operation. Default value is
Expand Down Expand Up @@ -192,8 +192,8 @@ class ImageEmbeddingsClient(ImageEmbeddingsClientOperationsMixin):
:param endpoint: Service host. Required.
:type endpoint: str
:param credential: Credential used to authenticate requests to the service. Is one of the
following types: AzureKeyCredential, AzureKeyCredential, TokenCredential Required.
:param credential: Credential used to authenticate requests to the service. Is either a key
credential type or a token credential type. Required.
:type credential: ~azure.core.credentials.AzureKeyCredential or
~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials.TokenCredential
:keyword api_version: The API version to use for this operation. Default value is
Expand Down
12 changes: 6 additions & 6 deletions sdk/ai/azure-ai-inference/azure/ai/inference/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class ChatCompletionsClientConfiguration: # pylint: disable=too-many-instance-a
:param endpoint: Service host. Required.
:type endpoint: str
:param credential: Credential used to authenticate requests to the service. Is one of the
following types: AzureKeyCredential, AzureKeyCredential, TokenCredential Required.
:param credential: Credential used to authenticate requests to the service. Is either a key
credential type or a token credential type. Required.
:type credential: ~azure.core.credentials.AzureKeyCredential or
~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials.TokenCredential
:keyword api_version: The API version to use for this operation. Default value is
Expand Down Expand Up @@ -82,8 +82,8 @@ class EmbeddingsClientConfiguration: # pylint: disable=too-many-instance-attrib
:param endpoint: Service host. Required.
:type endpoint: str
:param credential: Credential used to authenticate requests to the service. Is one of the
following types: AzureKeyCredential, AzureKeyCredential, TokenCredential Required.
:param credential: Credential used to authenticate requests to the service. Is either a key
credential type or a token credential type. Required.
:type credential: ~azure.core.credentials.AzureKeyCredential or
~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials.TokenCredential
:keyword api_version: The API version to use for this operation. Default value is
Expand Down Expand Up @@ -139,8 +139,8 @@ class ImageEmbeddingsClientConfiguration: # pylint: disable=too-many-instance-a
:param endpoint: Service host. Required.
:type endpoint: str
:param credential: Credential used to authenticate requests to the service. Is one of the
following types: AzureKeyCredential, AzureKeyCredential, TokenCredential Required.
:param credential: Credential used to authenticate requests to the service. Is either a key
credential type or a token credential type. Required.
:type credential: ~azure.core.credentials.AzureKeyCredential or
~azure.core.credentials.AzureKeyCredential or ~azure.core.credentials.TokenCredential
:keyword api_version: The API version to use for this operation. Default value is
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pylint: disable=too-many-lines,arguments-differ,signature-differs,no-member
# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# pylint: disable=too-many-locals
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
Expand Down Expand Up @@ -194,7 +193,7 @@ def _complete(
def _complete(
self,
*,
messages: List[_models._models.ChatRequestMessage],
messages: List[_models.ChatRequestMessage],
extra_params: Optional[Union[str, _models._enums.ExtraParameters]] = None,
content_type: str = "application/json",
frequency_penalty: Optional[float] = None,
Expand All @@ -203,7 +202,7 @@ def _complete(
temperature: Optional[float] = None,
top_p: Optional[float] = None,
max_tokens: Optional[int] = None,
response_format: Optional[_models._models.ChatCompletionsResponseFormat] = None,
response_format: Optional[_models.ChatCompletionsResponseFormat] = None,
stop: Optional[List[str]] = None,
tools: Optional[List[_models.ChatCompletionsToolDefinition]] = None,
tool_choice: Optional[
Expand All @@ -228,15 +227,15 @@ def _complete(
self,
body: Union[JSON, IO[bytes]] = _Unset,
*,
messages: List[_models._models.ChatRequestMessage] = _Unset,
messages: List[_models.ChatRequestMessage] = _Unset,
extra_params: Optional[Union[str, _models._enums.ExtraParameters]] = None,
frequency_penalty: Optional[float] = None,
stream_parameter: Optional[bool] = None,
presence_penalty: Optional[float] = None,
temperature: Optional[float] = None,
top_p: Optional[float] = None,
max_tokens: Optional[int] = None,
response_format: Optional[_models._models.ChatCompletionsResponseFormat] = None,
response_format: Optional[_models.ChatCompletionsResponseFormat] = None,
stop: Optional[List[str]] = None,
tools: Optional[List[_models.ChatCompletionsToolDefinition]] = None,
tool_choice: Optional[
Expand All @@ -259,7 +258,7 @@ def _complete(
Typical usage begins with a chat message for the System role that provides instructions for
the behavior of the assistant, followed by alternating messages between the User and
Assistant roles. Required.
:paramtype messages: list[~azure.ai.inference.models._models.ChatRequestMessage]
:paramtype messages: list[~azure.ai.inference.models.ChatRequestMessage]
:keyword extra_params: Controls what happens if extra parameters, undefined by the REST API,
are passed in the JSON request payload.
This sets the HTTP request header ``extra-parameters``. Known values are: "error", "drop", and
Expand Down Expand Up @@ -316,7 +315,7 @@ def _complete(
seemingly "stuck" request. Also note that the message content may be partially cut off if
``finish_reason="length"``\\ , which indicates the generation exceeded ``max_tokens`` or the
conversation exceeded the max context length. Default value is None.
:paramtype response_format: ~azure.ai.inference.models._models.ChatCompletionsResponseFormat
:paramtype response_format: ~azure.ai.inference.models.ChatCompletionsResponseFormat
:keyword stop: A collection of textual sequences that will end completions generation. Default
value is None.
:paramtype stop: list[str]
Expand Down
Loading

0 comments on commit dc49970

Please sign in to comment.