From 07c518ad3e9f974ba3a966ecfcf0791c2dfb2eb1 Mon Sep 17 00:00:00 2001 From: Leonid Ganeline Date: Sat, 9 Mar 2024 13:30:48 -0800 Subject: [PATCH] docs: `providers` update 4 (#18540) Created the `facebook` page from `facebook_faiss` and `facebook_chat` pages. Added another Facebook integrations into this page. Updated `discord` page. --- docs/docs/integrations/providers/discord.mdx | 10 +- docs/docs/integrations/providers/facebook.mdx | 93 +++++++++++++++++++ .../integrations/providers/facebook_chat.mdx | 21 ----- .../integrations/providers/facebook_faiss.mdx | 32 ------- docs/vercel.json | 54 ++++++----- 5 files changed, 133 insertions(+), 77 deletions(-) create mode 100644 docs/docs/integrations/providers/facebook.mdx delete mode 100644 docs/docs/integrations/providers/facebook_chat.mdx delete mode 100644 docs/docs/integrations/providers/facebook_faiss.mdx diff --git a/docs/docs/integrations/providers/discord.mdx b/docs/docs/integrations/providers/discord.mdx index 1aef837405..34c286fa61 100644 --- a/docs/docs/integrations/providers/discord.mdx +++ b/docs/docs/integrations/providers/discord.mdx @@ -6,7 +6,6 @@ ## Installation and Setup - ```bash pip install pandas ``` @@ -25,6 +24,15 @@ with Discord. That email will have a download button using which you would be ab See a [usage example](/docs/integrations/document_loaders/discord). +**NOTE:** The `DiscordChatLoader` is not the `ChatLoader` but a `DocumentLoader`. +It is used to load the data from the `Discord` data dump. +For the `ChatLoader` see Chat Loader section below. + ```python from langchain_community.document_loaders import DiscordChatLoader ``` + +## Chat Loader + +See a [usage example](/docs/integrations/chat_loaders/discord). + diff --git a/docs/docs/integrations/providers/facebook.mdx b/docs/docs/integrations/providers/facebook.mdx new file mode 100644 index 0000000000..6734c9462e --- /dev/null +++ b/docs/docs/integrations/providers/facebook.mdx @@ -0,0 +1,93 @@ +# Facebook - Meta + +>[Meta Platforms, Inc.](https://www.facebook.com/), doing business as `Meta`, formerly +> named `Facebook, Inc.`, and `TheFacebook, Inc.`, is an American multinational technology +> conglomerate. The company owns and operates `Facebook`, `Instagram`, `Threads`, +> and `WhatsApp`, among other products and services. + +## Embedding models + +### LASER + +>[LASER](https://github.com/facebookresearch/LASER) is a Python library developed by +> the `Meta AI Research` team and used for +> creating multilingual sentence embeddings for +> [over 147 languages as of 2/25/2024](https://github.com/facebookresearch/flores/blob/main/flores200/README.md#languages-in-flores-200) + +```bash +pip install laser_encoders +``` + +See a [usage example](/docs/integrations/text_embedding/laser). + +```python +from langchain_community.embeddings.laser import LaserEmbeddings +``` + +## Document loaders + +### Facebook Messenger + +>[Messenger](https://en.wikipedia.org/wiki/Messenger_(software)) is an instant messaging app and +> platform developed by `Meta Platforms`. Originally developed as `Facebook Chat` in 2008, the company revamped its +> messaging service in 2010. + +See a [usage example](/docs/integrations/document_loaders/facebook_chat). + +```python +from langchain_community.document_loaders import FacebookChatLoader +``` + +## Vector stores + +### Facebook Faiss + +>[Facebook AI Similarity Search (Faiss)](https://engineering.fb.com/2017/03/29/data-infrastructure/faiss-a-library-for-efficient-similarity-search/) +> is a library for efficient similarity search and clustering of dense vectors. It contains algorithms that +> search in sets of vectors of any size, up to ones that possibly do not fit in RAM. It also contains supporting +> code for evaluation and parameter tuning. + +[Faiss documentation](https://faiss.ai/). + +We need to install `faiss` python package. + +```bash +pip install faiss-gpu # For CUDA 7.5+ supported GPU's. +``` + +OR + +```bash +pip install faiss-cpu # For CPU Installation +``` + +See a [usage example](/docs/integrations/vectorstores/faiss). + +```python +from langchain_community.vectorstores import FAISS +``` + +## Chat loaders + +### Facebook Messenger + +>[Messenger](https://en.wikipedia.org/wiki/Messenger_(software)) is an instant messaging app and +> platform developed by `Meta Platforms`. Originally developed as `Facebook Chat` in 2008, the company revamped its +> messaging service in 2010. + +See a [usage example](/docs/integrations/chat_loaders/facebook). + +```python +from langchain_community.chat_loaders.facebook_messenger import ( + FolderFacebookMessengerChatLoader, + SingleFileFacebookMessengerChatLoader, +) +``` + +### Facebook WhatsApp + +See a [usage example](/docs/integrations/chat_loaders/whatsapp). + +```python +from langchain_community.chat_loaders.whatsapp import WhatsAppChatLoader +``` diff --git a/docs/docs/integrations/providers/facebook_chat.mdx b/docs/docs/integrations/providers/facebook_chat.mdx deleted file mode 100644 index b0c50b9d87..0000000000 --- a/docs/docs/integrations/providers/facebook_chat.mdx +++ /dev/null @@ -1,21 +0,0 @@ -# Facebook Chat - ->[Messenger](https://en.wikipedia.org/wiki/Messenger_(software)) is an American proprietary instant messaging app and -> platform developed by `Meta Platforms`. Originally developed as `Facebook Chat` in 2008, the company revamped its -> messaging service in 2010. - -## Installation and Setup - -First, you need to install `pandas` python package. - -```bash -pip install pandas -``` - -## Document Loader - -See a [usage example](/docs/integrations/document_loaders/facebook_chat). - -```python -from langchain_community.document_loaders import FacebookChatLoader -``` diff --git a/docs/docs/integrations/providers/facebook_faiss.mdx b/docs/docs/integrations/providers/facebook_faiss.mdx deleted file mode 100644 index c85d1907e4..0000000000 --- a/docs/docs/integrations/providers/facebook_faiss.mdx +++ /dev/null @@ -1,32 +0,0 @@ -# Facebook Faiss - ->[Facebook AI Similarity Search (Faiss)](https://engineering.fb.com/2017/03/29/data-infrastructure/faiss-a-library-for-efficient-similarity-search/) -> is a library for efficient similarity search and clustering of dense vectors. It contains algorithms that -> search in sets of vectors of any size, up to ones that possibly do not fit in RAM. It also contains supporting -> code for evaluation and parameter tuning. - -[Faiss documentation](https://faiss.ai/). - - -## Installation and Setup - -We need to install `faiss` python package. - -```bash -pip install faiss-gpu # For CUDA 7.5+ supported GPU's. -``` - -OR - -```bash -pip install faiss-cpu # For CPU Installation -``` - - -## Vector Store - -See a [usage example](/docs/integrations/vectorstores/faiss). - -```python -from langchain_community.vectorstores import FAISS -``` diff --git a/docs/vercel.json b/docs/vercel.json index 7558e904a9..38de5f571b 100644 --- a/docs/vercel.json +++ b/docs/vercel.json @@ -1,60 +1,68 @@ { "redirects": [ { - "source": "/docs/use_cases/graph/diffbot_graphtransformer", + "source": "/docs/integrations/providers/facebook_chat", + "destination": "/docs/integrations/providers/facebook" + }, + { + "source": "/docs/integrations/providers/facebook_faiss", + "destination": "/docs/integrations/providers/facebook" + }, + { + "source": "/docs/use_cases/graph/diffbot_graphtransformer", "destination": "/docs/use_cases/graph/integrations/diffbot_graphtransformer" }, { - "source": "/docs/use_cases/graph/graph_arangodb_qa", - "destination": "/docs/use_cases/graph/integrations/graph_arangodb_qa" + "source": "/docs/use_cases/graph/graph_arangodb_qa", + "destination": "/docs/use_cases/graph/integrations/graph_arangodb_qa" }, { "source": "/docs/use_cases/graph/graph_cypher_qa", "destination": "/docs/use_cases/graph/integrations/graph_cypher_qa" }, { - "source": "/docs/use_cases/graph/graph_falkordb_qa", - "destination": "/docs/use_cases/graph/integrations/graph_falkordb_qa" + "source": "/docs/use_cases/graph/graph_falkordb_qa", + "destination": "/docs/use_cases/graph/integrations/graph_falkordb_qa" }, { - "source": "/docs/use_cases/graph/graph_gremlin_cosmosdb_qa", - "destination": "/docs/use_cases/graph/integrations/graph_gremlin_cosmosdb_qa" + "source": "/docs/use_cases/graph/graph_gremlin_cosmosdb_qa", + "destination": "/docs/use_cases/graph/integrations/graph_gremlin_cosmosdb_qa" }, { - "source": "/docs/use_cases/graph/graph_hugegraph_qa", - "destination": "/docs/use_cases/graph/integrations/graph_hugegraph_qa" + "source": "/docs/use_cases/graph/graph_hugegraph_qa", + "destination": "/docs/use_cases/graph/integrations/graph_hugegraph_qa" }, { "source": "/docs/use_cases/graph/graph_kuzu_qa", "destination": "/docs/use_cases/graph/integrations/graph_kuzu_qa" }, { - "source": "/docs/use_cases/graph/graph_memgraph_qa", - "destination": "/docs/use_cases/graph/integrations/graph_memgraph_qa" + "source": "/docs/use_cases/graph/graph_memgraph_qa", + "destination": "/docs/use_cases/graph/integrations/graph_memgraph_qa" }, { - "source": "/docs/use_cases/graph/graph_nebula_qa", - "destination": "/docs/use_cases/graph/integrations/graph_nebula_qa" + "source": "/docs/use_cases/graph/graph_nebula_qa", + "destination": "/docs/use_cases/graph/integrations/graph_nebula_qa" }, { - "source": "/docs/use_cases/graph/graph_networkx_qa", - "destination": "/docs/use_cases/graph/integrations/graph_networkx_qa" + "source": "/docs/use_cases/graph/graph_networkx_qa", + "destination": "/docs/use_cases/graph/integrations/graph_networkx_qa" }, { - "source": "/docs/use_cases/graph/graph_ontotext_graphdb_qa", - "destination": "/docs/use_cases/graph/integrations/graph_ontotext_graphdb_qa" + "source": "/docs/use_cases/graph/graph_ontotext_graphdb_qa", + "destination": "/docs/use_cases/graph/integrations/graph_ontotext_graphdb_qa" }, { - "source": "/docs/use_cases/graph/graph_sparql_qa", - "destination": "/docs/use_cases/graph/integrations/graph_sparql_qa" + "source": "/docs/use_cases/graph/graph_sparql_qa", + "destination": "/docs/use_cases/graph/integrations/graph_sparql_qa" }, { - "source": "/docs/use_cases/graph/neptune_cypher_qa.ipynb", - "destination": "/docs/use_cases/graph/integrations/neptune_cypher_qa.ipynb" + "source": "/docs/use_cases/graph/neptune_cypher_qa.ipynb", + "destination": "/docs/use_cases/graph/integrations/neptune_cypher_qa.ipynb" }, { - "source": "/docs/use_cases/graph/neptune_sparql_qa", - "destination": "/docs/use_cases/graph/integrations/neptune_sparql_qa" + "source": "/docs/use_cases/graph/neptune_sparql_qa", + "destination": "/docs/use_cases/graph/integrations/neptune_sparql_qa" }, { "source": "/docs/integrations/memory/google_cloud_sql_mssql",