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
Microsoft SharePoint
Microsoft SharePoint is a website-based collaboration system that uses workflow applications, “list” databases, and other web parts and security features to empower business teams to work together developed by Microsoft.
See a usage example.
from langchain_community.document_loaders.sharepoint import SharePointLoader
Microsoft PowerPoint
Microsoft PowerPoint is a presentation program by Microsoft.
See a usage example.
from langchain_community.document_loaders import UnstructuredPowerPointLoader
Microsoft OneNote
First, let's install dependencies:
pip install bs4 msal
See a usage example.
from langchain_community.document_loaders.onenote import OneNoteLoader
Playwright URL Loader
Playwright is an open-source automation tool developed by
Microsoft
that allows you to programmatically control and automate web browsers. It is designed for end-to-end testing, scraping, and automating tasks across various web browsers such asChromium
,Firefox
, andWebKit
.
First, let's install dependencies:
pip install playwright unstructured
See a usage example.
from langchain_community.document_loaders.onenote import OneNoteLoader
Vector Stores
Azure Cosmos DB
AI agents can rely on Azure Cosmos DB as a unified memory system solution, enjoying speed, scale, and simplicity. This service successfully enabled OpenAI's ChatGPT service to scale dynamically with high reliability and low maintenance. Powered by an atom-record-sequence engine, it is the world's first globally distributed NoSQL, relational, and vector database service that offers a serverless mode.
Below are two available Azure Cosmos DB APIs that can provide vector store functionalities.
Azure Cosmos DB for MongoDB (vCore)
Azure Cosmos DB for MongoDB vCore makes it easy to create a database with full native MongoDB support. You can apply your MongoDB experience and continue to use your favorite MongoDB drivers, SDKs, and tools by pointing your application to the API for MongoDB vCore account's connection string. Use vector search in Azure Cosmos DB for MongoDB vCore to seamlessly integrate your AI-based applications with your data that's stored in Azure Cosmos DB.
Installation and Setup
See detail configuration instructions.
We need to install pymongo
python package.
pip install pymongo