Microsoft
All functionality related to Microsoft Azure
and other Microsoft
products.
Chat Models
Azure OpenAI
Microsoft Azure, often referred to as
Azure
is a cloud computing platform run byMicrosoft
, which offers access, management, and development of applications and services through global data centers. It provides a range of capabilities, including software as a service (SaaS), platform as a service (PaaS), and infrastructure as a service (IaaS).Microsoft Azure
supports many programming languages, tools, and frameworks, including Microsoft-specific and third-party software and systems.
Azure OpenAI is an
Azure
service with powerful language models fromOpenAI
including theGPT-3
,Codex
andEmbeddings model
series for content generation, summarization, semantic search, and natural language to code translation.
pip install langchain-openai
Set the environment variables to get access to the Azure OpenAI
service.
import os
os.environ["AZURE_OPENAI_ENDPOINT"] = "https://<your-endpoint.openai.azure.com/"
os.environ["AZURE_OPENAI_API_KEY"] = "your AzureOpenAI key"
See a usage example
from langchain_openai import AzureChatOpenAI
Azure ML Chat Online Endpoint
See the documentation here for accessing chat models hosted with Azure Machine Learning.
LLMs
Azure ML
See a usage example.
from langchain_community.llms.azureml_endpoint import AzureMLOnlineEndpoint
Azure OpenAI
See a usage example.
from langchain_openai import AzureOpenAI
Embedding Models
Azure OpenAI
See a usage example
from langchain_openai import AzureOpenAIEmbeddings
Document loaders
Azure AI Data
Azure AI Studio provides the capability to upload data assets to cloud storage and register existing data assets from the following sources:
Microsoft OneLake
Azure Blob Storage
Azure Data Lake gen 2
First, you need to install several python packages.
pip install azureml-fsspec, azure-ai-generative
See a usage example.
from langchain.document_loaders import AzureAIDataLoader
Azure AI Document Intelligence
Azure AI Document Intelligence (formerly known as
Azure Form Recognizer
) is machine-learning based service that extracts texts (including handwriting), tables, document structures, and key-value-pairs from digital or scanned PDFs, images, Office and HTML files.Document Intelligence supports
JPEG/JPG
,PNG
,BMP
,TIFF
,HEIF
,DOCX
,XLSX
,PPTX
andHTML
.
First, you need to install a python package.
pip install azure-ai-documentintelligence
See a usage example.
from langchain.document_loaders import AzureAIDocumentIntelligenceLoader
Azure Blob Storage
Azure Blob Storage is Microsoft's object storage solution for the cloud. Blob Storage is optimized for storing massive amounts of unstructured data. Unstructured data is data that doesn't adhere to a particular data model or definition, such as text or binary data.
Azure Files offers fully managed file shares in the cloud that are accessible via the industry standard Server Message Block (
SMB
) protocol, Network File System (NFS
) protocol, andAzure Files REST API
.Azure Files
are based on theAzure Blob Storage
.
Azure Blob Storage
is designed for:
- Serving images or documents directly to a browser.
- Storing files for distributed access.
- Streaming video and audio.
- Writing to log files.
- Storing data for backup and restore, disaster recovery, and archiving.
- Storing data for analysis by an on-premises or Azure-hosted service.
pip install azure-storage-blob
See a usage example for the Azure Blob Storage.
from langchain_community.document_loaders import AzureBlobStorageContainerLoader
See a usage example for the Azure Files.
from langchain_community.document_loaders import AzureBlobStorageFileLoader
Microsoft OneDrive
Microsoft OneDrive (formerly
SkyDrive
) is a file-hosting service operated by Microsoft.
First, you need to install a python package.
pip install o365
See a usage example.
from langchain_community.document_loaders import OneDriveLoader
Microsoft OneDrive File
Microsoft OneDrive (formerly
SkyDrive
) is a file-hosting service operated by Microsoft.
First, you need to install a python package.
pip install o365
from langchain_community.document_loaders import OneDriveFileLoader
Microsoft Word
Microsoft Word is a word processor developed by Microsoft.
See a usage example.
from langchain_community.document_loaders import UnstructuredWordDocumentLoader
Microsoft Excel
Microsoft Excel is a spreadsheet editor developed by Microsoft for Windows, macOS, Android, iOS and iPadOS. It features calculation or computation capabilities, graphing tools, pivot tables, and a macro programming language called Visual Basic for Applications (VBA). Excel forms part of the Microsoft 365 suite of software.
The UnstructuredExcelLoader
is used to load Microsoft Excel
files. The loader works with both .xlsx
and .xls
files.
The page content will be the raw text of the Excel file. If you use the loader in "elements"
mode, an HTML
representation of the Excel file will be available in the document metadata under the text_as_html
key.
See a usage example.
from langchain_community.document_loaders import UnstructuredExcelLoader