langchain-azure-ai: 0.1.7#

Azure AI Foundry integration with LangChain/LangGraph.

agents#

Classes

agents.agent_service.AgentServiceFactory

Factory to create and manage declarative chat agents in Azure AI Foundry.

agents.prebuilt.declarative.DeclarativeChatAgentNode(...)

A LangGraph node that represents a declarative chat agent in Azure AI Foundry.

agents.prebuilt.tools.AgentServiceBaseTool

A tool that interacts with Azure AI Foundry Agent Service.

Functions

agents.agent_service.external_tools_condition(state)

Determine the next node based on whether the AI message contains tool calls.

chat_message_histories#

Classes

chat_message_histories.cosmos_db.CosmosDBChatMessageHistory(...)

Chat message history backed by Azure CosmosDB.

chat_models#

Classes

chat_models.inference.AzureAIChatCompletionsModel

Azure AI Chat Completions Model.

Functions

chat_models.inference.from_inference_message(message)

Convert an inference message dict to generic message.

chat_models.inference.to_inference_message(...)

Converts a sequence of BaseMessage to ChatRequestMessage.

embeddings#

Classes

embeddings.inference.AzureAIEmbeddingsModel

Azure AI model inference for embeddings.

query_constructors#

Classes

query_constructors.cosmosdb_no_sql.AzureCosmosDbNoSQLTranslator([...])

A visitor that converts a StructuredQuery into an CosmosDB NO SQL query.

retrievers#

Classes

retrievers.azure_ai_search.AzureAISearchRetriever

Azure AI Search service retriever.

retrievers.azure_ai_search.AzureCognitiveSearchRetriever

Azure Cognitive Search service retriever.

tools#

Classes

tools.ai_services.document_intelligence.AzureAIDocumentIntelligenceTool

Tool that queries the Azure AI Document Intelligence API.

tools.ai_services.document_intelligence.DocumentInput

The input document for the Azure AI Document Intelligence tool.

tools.ai_services.image_analysis.AzureAIImageAnalysisTool

Tool that queries the Azure AI Services Image Analysis API.

tools.ai_services.image_analysis.ImageInput

The input document for the Azure AI Image Analysis tool.

tools.ai_services.text_analytics_health.AzureAITextAnalyticsHealthTool

Tool that queries the Azure AI Text Analytics for Health API.

tools.logic_apps.AzureLogicAppTool

A tool that interacts with Azure Logic Apps.

utils#

Classes

utils.utils.JSONObjectEncoder(*[, skipkeys, ...])

Custom JSON encoder for objects in LangChain.

Functions

utils.env.get_from_dict_or_env(data, key, ...)

Get a value from a dictionary or an environment variable.

utils.env.get_from_env(key, env_key[, ...])

Get a value from a dictionary or an environment variable.

utils.math.cosine_similarity(X, Y)

Row-wise cosine similarity between two equal-width matrices.

utils.math.cosine_similarity_top_k(X, Y[, ...])

Row-wise cosine similarity with optional top-k and score threshold filtering.

utils.utils.detect_file_src_type(file_path)

Detect if the file is local or remote.

utils.utils.download_audio_from_url(audio_url)

Download audio from url to local.

utils.utils.get_endpoint_from_project(...[, ...])

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

vectorstores#

Classes

vectorstores.azure_cosmos_db_mongo_vcore.AzureCosmosDBMongoVCoreVectorSearch(...)

Azure Cosmos DB for MongoDB vCore vector store.

vectorstores.azure_cosmos_db_mongo_vcore.CosmosDBSimilarityType(value)

Cosmos DB Similarity Type as enumerator.

vectorstores.azure_cosmos_db_mongo_vcore.CosmosDBVectorSearchCompression(value)

Cosmos DB Vector Search Compression as enumerator.

vectorstores.azure_cosmos_db_mongo_vcore.CosmosDBVectorSearchType(value)

Cosmos DB Vector Search Type as enumerator.

vectorstores.azure_cosmos_db_no_sql.AzureCosmosDBNoSqlVectorSearch(*, ...)

Azure Cosmos DB for NoSQL vector store.

vectorstores.azure_cosmos_db_no_sql.AzureCosmosDBNoSqlVectorStoreRetriever

Retriever that uses Azure CosmosDB No Sql Search.

vectorstores.azuresearch.AzureSearch(...[, ...])

Azure Cognitive Search vector store.

vectorstores.azuresearch.AzureSearchVectorStoreRetriever

Retriever that uses Azure Cognitive Search.

vectorstores.cache.AzureCosmosDBMongoVCoreSemanticCache(...)

Cache that uses Cosmos DB Mongo vCore vector-store backend.

vectorstores.cache.AzureCosmosDBNoSqlSemanticCache(...)

Cache that uses Cosmos DB NoSQL backend.

vectorstores.utils.DistanceStrategy(value)

Enumerator of the Distance strategies for calculating distances between vectors.

Functions

vectorstores.utils.filter_complex_metadata(...)

Filter out metadata types that are not supported for a vector store.

vectorstores.utils.maximal_marginal_relevance(...)

Calculate maximal marginal relevance.