From 455c760546850bdec3067e5b9d80b275717501eb Mon Sep 17 00:00:00 2001 From: leo-gan Date: Tue, 15 Oct 2024 16:48:43 -0700 Subject: [PATCH 1/2] update --- .../integrations/providers/byte_dance.mdx | 16 +++++++++---- docs/docs/integrations/providers/localai.mdx | 24 +++++++++++++++++++ docs/docs/integrations/providers/milvus.mdx | 18 ++++++++++---- docs/docs/integrations/providers/mongodb.mdx | 24 +++++++++++++++++++ .../integrations/providers/mongodb_atlas.mdx | 22 ++++++++++++++++- 5 files changed, 94 insertions(+), 10 deletions(-) create mode 100644 docs/docs/integrations/providers/localai.mdx create mode 100644 docs/docs/integrations/providers/mongodb.mdx diff --git a/docs/docs/integrations/providers/byte_dance.mdx b/docs/docs/integrations/providers/byte_dance.mdx index 8746bcf519fe4..25f6e2533ef62 100644 --- a/docs/docs/integrations/providers/byte_dance.mdx +++ b/docs/docs/integrations/providers/byte_dance.mdx @@ -8,15 +8,23 @@ Get the access token. You can find the access instructions [here](https://open.larksuite.com/document) -## Document Loader - -### Lark Suite +## Document Loaders >[Lark Suite](https://www.larksuite.com/) is an enterprise collaboration platform > developed by `ByteDance`. -See a [usage example](/docs/integrations/document_loaders/larksuite). +### Lark Suite for Document + +See a [usage example](/docs/integrations/document_loaders/larksuite/#load-from-document). ```python from langchain_community.document_loaders.larksuite import LarkSuiteDocLoader ``` + +### Lark Suite for Wiki + +See a [usage example](/docs/integrations/document_loaders/larksuite/#load-from-wiki). + +```python +from langchain_community.document_loaders.larksuite import LarkSuiteWikiLoader +``` diff --git a/docs/docs/integrations/providers/localai.mdx b/docs/docs/integrations/providers/localai.mdx new file mode 100644 index 0000000000000..1424420b53338 --- /dev/null +++ b/docs/docs/integrations/providers/localai.mdx @@ -0,0 +1,24 @@ +# LocalAI + +>[LocalAI](https://localai.io/) is the free, Open Source OpenAI alternative. +> `LocalAI` act as a drop-in replacement REST API that’s compatible with OpenAI API +> specifications for local inferencing. It allows you to run LLMs, generate images, +> audio (and not only) locally or on-prem with consumer grade hardware, +> supporting multiple model families and architectures. + +## Installation and Setup + +We have to install several python packages: + +```bash +pip install tenacity openai +``` + + +## Embedding models + +See a [usage example](/docs/integrations/text_embedding/localai). + +```python +from langchain_community.embeddings import LocalAIEmbeddings +``` diff --git a/docs/docs/integrations/providers/milvus.mdx b/docs/docs/integrations/providers/milvus.mdx index ea11c08fd1b4c..94d1228d7d4a1 100644 --- a/docs/docs/integrations/providers/milvus.mdx +++ b/docs/docs/integrations/providers/milvus.mdx @@ -9,17 +9,25 @@ Install the Python SDK: ```bash -pip install pymilvus +pip install pymilvus langchain-milvus ``` ## Vector Store -There exists a wrapper around `Milvus` indexes, allowing you to use it as a vectorstore, -whether for semantic search or example selection. +See a [usage example](/docs/integrations/vectorstores/milvus). To import this vectorstore: ```python -from langchain_community.vectorstores import Milvus +from langchain_milvus import Milvus +``` + +## Retrievers + +See a [usage example](/docs/integrations/retrievers/milvus_hybrid_search). + +To import this vectorstore: +```python +from langchain_milvus.retrievers import MilvusCollectionHybridSearchRetriever +from langchain_milvus.utils.sparse import BM25SparseEmbedding ``` -For a more detailed walkthrough of the `Miluvs` wrapper, see [this notebook](/docs/integrations/vectorstores/milvus) diff --git a/docs/docs/integrations/providers/mongodb.mdx b/docs/docs/integrations/providers/mongodb.mdx new file mode 100644 index 0000000000000..f981cdc130271 --- /dev/null +++ b/docs/docs/integrations/providers/mongodb.mdx @@ -0,0 +1,24 @@ +# MongoDB + +>[MongoDB](https://www.mongodb.com/) is a NoSQL, document-oriented +> database that supports JSON-like documents with a dynamic schema. + +**NOTE:** +- See other `MongoDB` integrations on the [MongoDB Atlas page](/docs/integrations/providers/mongodb_atlas). + +## Installation and Setup + +Install the Python package: + +```bash +pip install langchain-mongodb +``` + +## Message Histories + +See a [usage example](/docs/integrations/memory/mongodb_chat_message_history). + +To import this vectorstore: +```python +from langchain_mongodb.chat_message_histories import MongoDBChatMessageHistory +``` diff --git a/docs/docs/integrations/providers/mongodb_atlas.mdx b/docs/docs/integrations/providers/mongodb_atlas.mdx index 67fd9b2395c3f..db9d90d0ffbd3 100644 --- a/docs/docs/integrations/providers/mongodb_atlas.mdx +++ b/docs/docs/integrations/providers/mongodb_atlas.mdx @@ -22,10 +22,30 @@ See a [usage example](/docs/integrations/vectorstores/mongodb_atlas). from langchain_mongodb import MongoDBAtlasVectorSearch ``` +## Retrievers -## LLM Caches +### Full Text Search Retriever + +>`Hybrid Search Retriever` performs full-text searches using +> Lucene’s standard (`BM25`) analyzer. + +```python +from langchain_mongodb.retrievers.full_text_search import MongoDBAtlasFullTextSearchRetriever +``` + +### Hybrid Search Retriever + +>`Hybrid Search Retriever` combines vector and full-text searches weighting +> them the via `Reciprocal Rank Fusion` (`RRF`) algorithm. + +```python +from langchain_mongodb.retrievers.hybrid_search import MongoDBAtlasHybridSearchRetriever +``` + +## Model Caches ### MongoDBCache + An abstraction to store a simple cache in MongoDB. This does not use Semantic Caching, nor does it require an index to be made on the collection before generation. To import this cache: From a76f22f9e15824bc045c410070615bb6a57e47a1 Mon Sep 17 00:00:00 2001 From: Erick Friis Date: Tue, 15 Oct 2024 19:22:10 -0700 Subject: [PATCH 2/2] Apply suggestions from code review --- docs/docs/integrations/providers/milvus.mdx | 2 +- docs/docs/integrations/providers/mongodb_atlas.mdx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/integrations/providers/milvus.mdx b/docs/docs/integrations/providers/milvus.mdx index 94d1228d7d4a1..d73590fdff0c0 100644 --- a/docs/docs/integrations/providers/milvus.mdx +++ b/docs/docs/integrations/providers/milvus.mdx @@ -9,7 +9,7 @@ Install the Python SDK: ```bash -pip install pymilvus langchain-milvus +pip install langchain-milvus ``` ## Vector Store diff --git a/docs/docs/integrations/providers/mongodb_atlas.mdx b/docs/docs/integrations/providers/mongodb_atlas.mdx index db9d90d0ffbd3..601b84f015cbd 100644 --- a/docs/docs/integrations/providers/mongodb_atlas.mdx +++ b/docs/docs/integrations/providers/mongodb_atlas.mdx @@ -30,7 +30,7 @@ from langchain_mongodb import MongoDBAtlasVectorSearch > Lucene’s standard (`BM25`) analyzer. ```python -from langchain_mongodb.retrievers.full_text_search import MongoDBAtlasFullTextSearchRetriever +from langchain_mongodb.retrievers import MongoDBAtlasFullTextSearchRetriever ``` ### Hybrid Search Retriever @@ -39,7 +39,7 @@ from langchain_mongodb.retrievers.full_text_search import MongoDBAtlasFullTextSe > them the via `Reciprocal Rank Fusion` (`RRF`) algorithm. ```python -from langchain_mongodb.retrievers.hybrid_search import MongoDBAtlasHybridSearchRetriever +from langchain_mongodb.retrievers import MongoDBAtlasHybridSearchRetriever ``` ## Model Caches