get_endpoint_from_project#

langchain_azure_ai.utils.utils.get_endpoint_from_project(
project_endpoint: str,
credential: TokenCredential,
service: Literal['inference'] | Literal['cognitive_services'] | str = 'inference',
api_version: str = 'v1',
) Tuple[str, AzureKeyCredential | TokenCredential][source]#

Retrieves the endpoint and credentials required a given a project endpoint.

It uses the Azure AI project’s connection string to retrieve the inference defaults. The default connection of type Azure AI Services is used to retrieve the endpoint and credentials.

Parameters:
  • project_endpoint (str) – Endpoint for the Azure AI project.

  • credential (TokenCredential) – Azure credential object. Credentials must be of type TokenCredential when using the project_endpoint parameter.

  • service (str) – The type of service to retrieve the endpoint for. Can be one of “inference”, or “cognitive_services”. Defaults to “inference”.

  • api_version (str) – API version to use when retrieving the endpoint. Defaults to “v1”.

Returns:

Endpoint URL and

credentials.

Return type:

Tuple[str, Union[AzureKeyCredential, TokenCredential]]