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 openai tiktoken
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.chat_models import AzureChatOpenAI
Text Embedding Modelsβ
Azure OpenAIβ
See a usage example
from langchain.embeddings import AzureOpenAIEmbeddings
LLMsβ
Azure OpenAIβ
See a usage example.
from langchain.llms import AzureOpenAI
Document loadersβ
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.document_loaders import AzureBlobStorageContainerLoader
See a usage example for the Azure Files.
from langchain.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.document_loaders import OneDriveLoader
Microsoft Wordβ
Microsoft Word is a word processor developed by Microsoft.
See a usage example.
from langchain.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.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.document_loaders.sharepoint import SharePointLoader
Microsoft PowerPointβ
Microsoft PowerPoint is a presentation program by Microsoft.
See a usage example.
from langchain.document_loaders import UnstructuredPowerPointLoader
Microsoft OneNoteβ
First, let's install dependencies:
pip install bs4 msal
See a usage example.
from langchain.document_loaders.onenote import OneNoteLoader
Vector storesβ
Azure Cosmos DBβ
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
Deploy Azure Cosmos DB on Microsoft Azureβ
Azure Cosmos DB for MongoDB vCore provides developers with a fully managed MongoDB-compatible database service for building modern applications with a familiar architecture.
With Cosmos DB for MongoDB vCore, developers can enjoy the benefits of native Azure integrations, low total cost of ownership (TCO), and the familiar vCore architecture when migrating existing applications or building new ones.
Sign Up for free to get started today.
See a usage example.
from langchain.vectorstores import AzureCosmosDBVectorSearch
Retrieversβ
Azure Cognitive Searchβ
Azure Cognitive Search (formerly known as
Azure Search
) is a cloud search service that gives developers infrastructure, APIs, and tools for building a rich search experience over private, heterogeneous content in web, mobile, and enterprise applications.
Search is foundational to any app that surfaces text to users, where common scenarios include catalog or document search, online retail apps, or data exploration over proprietary content. When you create a search service, you'll work with the following capabilities:
- A search engine for full text search over a search index containing user-owned content
- Rich indexing, with lexical analysis and optional AI enrichment for content extraction and transformation
- Rich query syntax for text search, fuzzy search, autocomplete, geo-search and more
- Programmability through REST APIs and client libraries in Azure SDKs
- Azure integration at the data layer, machine learning layer, and AI (Cognitive Services)
See set up instructions.
See a usage example.
from langchain.retrievers import AzureCognitiveSearchRetriever
Utilitiesβ
Bing Search APIβ
Microsoft Bing, commonly referred to as
Bing
orBing Search
, is a web search engine owned and operated byMicrosoft
.
See a usage example.
from langchain.utilities import BingSearchAPIWrapper
Toolkitsβ
Azure Cognitive Servicesβ
We need to install several python packages.
pip install azure-ai-formrecognizer azure-cognitiveservices-speech azure-ai-vision
See a usage example.
from langchain.agents.agent_toolkits import O365Toolkit
Microsoft Office 365 email and calendarβ
We need to install O365
python package.
pip install O365
See a usage example.
from langchain.agents.agent_toolkits import O365Toolkit
Microsoft Azure PowerBIβ
We need to install azure-identity
python package.
pip install azure-identity
See a usage example.
from langchain.agents.agent_toolkits import PowerBIToolkit
from langchain.utilities.powerbi import PowerBIDataset
Moreβ
Microsoft Presidioβ
Presidio (Origin from Latin praesidium βprotection, garrisonβ) helps to ensure sensitive data is properly managed and governed. It provides fast identification and anonymization modules for private entities in text and images such as credit card numbers, names, locations, social security numbers, bitcoin wallets, US phone numbers, financial data and more.
First, you need to install several python packages and download a SpaCy
model.
pip install langchain-experimental openai presidio-analyzer presidio-anonymizer spacy Faker
python -m spacy download en_core_web_lg
See usage examples.
from langchain_experimental.data_anonymizer import PresidioAnonymizer, PresidioReversibleAnonymizer