langchain-azure-ai: 0.1.1#

LangChain integrations for Azure AI.

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.

utils#

Classes

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

Custom JSON encoder for objects in LangChain.

Functions

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.get_endpoint_from_project(...)

Retrieves the default inference endpoint and credentials from a project.

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.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.azure_cosmos_db_no_sql.Condition

Condition class for PreFilter.

vectorstores.azure_cosmos_db_no_sql.PreFilter

PreFilter class for filters.

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.