Azure ML
Azure ML 是一个用于构建、训练和部署机器学习模型的平台。用户可以在模型目录中探索可部署的模型类型,该目录提供来自不同供应商的基础和通用模型。
本笔记本介绍如何使用托管在 Azure ML 在线端点
上的 LLM。
##Installing the langchain packages needed to use the integration
%pip install -qU langchain-community
<!--IMPORTS:[{"imported": "AzureMLOnlineEndpoint", "source": "langchain_community.llms.azureml_endpoint", "docs": "https://python.langchain.com/api_reference/community/llms/langchain_community.llms.azureml_endpoint.AzureMLOnlineEndpoint.html", "title": "Azure ML"}]-->
from langchain_community.llms.azureml_endpoint import AzureMLOnlineEndpoint
设置
您必须 在 Azure ML 上部署模型 或 在 Azure AI Studio 上 并获取以下参数:
endpoint_url
: 由端点提供的 REST 端点 URL。endpoint_api_type
: 在将模型部署到 专用端点(托管的基础设施)时使用endpoint_type='dedicated'
。在使用 按需付费 提供的模型作为服务时,使用endpoint_type='serverless'
。endpoint_api_key
: 由端点提供的 API 密钥。deployment_name
: (可选)使用端点的模型的部署名称。