AzureMLBaseEndpoint#

class langchain_community.llms.azureml_endpoint.AzureMLBaseEndpoint[source]#

Bases: BaseModel

Azure ML Online Endpoint models.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

param content_formatter: Any = None#

The content formatter that provides an input and output transform function to handle formats between the LLM and the endpoint

param deployment_name: str = ''#

Deployment Name for Endpoint. NOT REQUIRED to call endpoint. Should be passed to constructor or specified as env var AZUREML_DEPLOYMENT_NAME.

param endpoint_api_key: SecretStr = SecretStr('')#

Authentication Key for Endpoint. Should be passed to constructor or specified as env var AZUREML_ENDPOINT_API_KEY.

param endpoint_api_type: AzureMLEndpointApiType = AzureMLEndpointApiType.dedicated#

Type of the endpoint being consumed. Possible values are serverless for pay-as-you-go and dedicated for dedicated endpoints.

param endpoint_url: str = ''#

URL of pre-existing Endpoint. Should be passed to constructor or specified as env var AZUREML_ENDPOINT_URL.

param max_retries: int = 1#
param model_kwargs: dict | None = None#

Keyword arguments to pass to the model.

param timeout: int = 50#

Request timeout for calls to the endpoint

classmethod validate_client(field_value: Any, values: Dict) AzureMLEndpointClient[source]#

Validate that api key and python package exists in environment.

Parameters:
  • field_value (Any)

  • values (Dict)

Return type:

AzureMLEndpointClient

classmethod validate_content_formatter(field_value: Any, values: Dict) ContentFormatterBase[source]#

Validate that content formatter is supported by endpoint type.

Parameters:
  • field_value (Any)

  • values (Dict)

Return type:

ContentFormatterBase

classmethod validate_endpoint_api_type(field_value: Any, values: Dict) AzureMLEndpointApiType[source]#

Validate that endpoint api type is compatible with the URL format.

Parameters:
  • field_value (Any)

  • values (Dict)

Return type:

AzureMLEndpointApiType

classmethod validate_endpoint_url(field_value: Any) str[source]#

Validate that endpoint url is complete.

Parameters:

field_value (Any)

Return type:

str