diff --git a/docs/index.rst b/docs/index.rst index 0c70e6821c408..8e971a9dfaef2 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -134,25 +134,24 @@ Reference Docs :hidden: ./reference/installation.md - ./reference/integrations.md ./reference.rst -LangChain Ecosystem -------------------- +Ecosystem +------------ -| Guides for how other companies/products can be used with LangChain. +| Guides for how other products can be used with LangChain. -- `LangChain Ecosystem <./ecosystem.html>`_ +- `Integrations <./integrations.html>`_ .. toctree:: - :maxdepth: 1 + :maxdepth: 2 :glob: :caption: Ecosystem :name: ecosystem :hidden: - ./ecosystem.rst + ./integrations.rst Additional Resources diff --git a/docs/ecosystem.rst b/docs/integrations.rst similarity index 64% rename from docs/ecosystem.rst rename to docs/integrations.rst index f43a500e8c9e7..75a244d4eeda9 100644 --- a/docs/ecosystem.rst +++ b/docs/integrations.rst @@ -1,12 +1,13 @@ -LangChain Ecosystem +Integrations =================== -Guides for how other companies/products can be used with LangChain +LangChain integrates with many LLMs, systems, and products. -Groups ----------- +Integrations by Module +-------------------------------- + +Integrations grouped by the core LangChain module they map to: -LangChain provides integration with many LLMs and systems: - `LLM Providers <./modules/models/llms/integrations.html>`_ - `Chat Model Providers <./modules/models/chat/integrations.html>`_ @@ -18,12 +19,15 @@ LangChain provides integration with many LLMs and systems: - `Tool Providers <./modules/agents/tools.html>`_ - `Toolkit Integrations <./modules/agents/toolkits.html>`_ -Companies / Products --------------------- + +All Integrations +------------------------------------------- + +A comprehensive list of LLMs, systems, and products integrated with LangChain: .. toctree:: :maxdepth: 1 :glob: - ecosystem/* + integrations/* diff --git a/docs/ecosystem/ai21.md b/docs/integrations/ai21.md similarity index 100% rename from docs/ecosystem/ai21.md rename to docs/integrations/ai21.md diff --git a/docs/ecosystem/aim_tracking.ipynb b/docs/integrations/aim_tracking.ipynb similarity index 100% rename from docs/ecosystem/aim_tracking.ipynb rename to docs/integrations/aim_tracking.ipynb diff --git a/docs/ecosystem/analyticdb.md b/docs/integrations/analyticdb.md similarity index 100% rename from docs/ecosystem/analyticdb.md rename to docs/integrations/analyticdb.md diff --git a/docs/ecosystem/anyscale.md b/docs/integrations/anyscale.md similarity index 100% rename from docs/ecosystem/anyscale.md rename to docs/integrations/anyscale.md diff --git a/docs/ecosystem/apify.md b/docs/integrations/apify.md similarity index 100% rename from docs/ecosystem/apify.md rename to docs/integrations/apify.md diff --git a/docs/ecosystem/atlas.md b/docs/integrations/atlas.md similarity index 100% rename from docs/ecosystem/atlas.md rename to docs/integrations/atlas.md diff --git a/docs/ecosystem/bananadev.md b/docs/integrations/bananadev.md similarity index 100% rename from docs/ecosystem/bananadev.md rename to docs/integrations/bananadev.md diff --git a/docs/ecosystem/cerebriumai.md b/docs/integrations/cerebriumai.md similarity index 100% rename from docs/ecosystem/cerebriumai.md rename to docs/integrations/cerebriumai.md diff --git a/docs/ecosystem/chroma.md b/docs/integrations/chroma.md similarity index 100% rename from docs/ecosystem/chroma.md rename to docs/integrations/chroma.md diff --git a/docs/ecosystem/clearml_tracking.ipynb b/docs/integrations/clearml_tracking.ipynb similarity index 100% rename from docs/ecosystem/clearml_tracking.ipynb rename to docs/integrations/clearml_tracking.ipynb diff --git a/docs/ecosystem/cohere.md b/docs/integrations/cohere.md similarity index 100% rename from docs/ecosystem/cohere.md rename to docs/integrations/cohere.md diff --git a/docs/ecosystem/comet_tracking.ipynb b/docs/integrations/comet_tracking.ipynb similarity index 100% rename from docs/ecosystem/comet_tracking.ipynb rename to docs/integrations/comet_tracking.ipynb diff --git a/docs/ecosystem/databerry.md b/docs/integrations/databerry.md similarity index 100% rename from docs/ecosystem/databerry.md rename to docs/integrations/databerry.md diff --git a/docs/ecosystem/deepinfra.md b/docs/integrations/deepinfra.md similarity index 100% rename from docs/ecosystem/deepinfra.md rename to docs/integrations/deepinfra.md diff --git a/docs/ecosystem/deeplake.md b/docs/integrations/deeplake.md similarity index 100% rename from docs/ecosystem/deeplake.md rename to docs/integrations/deeplake.md diff --git a/docs/ecosystem/docugami.md b/docs/integrations/docugami.md similarity index 100% rename from docs/ecosystem/docugami.md rename to docs/integrations/docugami.md diff --git a/docs/ecosystem/forefrontai.md b/docs/integrations/forefrontai.md similarity index 100% rename from docs/ecosystem/forefrontai.md rename to docs/integrations/forefrontai.md diff --git a/docs/ecosystem/google_search.md b/docs/integrations/google_search.md similarity index 98% rename from docs/ecosystem/google_search.md rename to docs/integrations/google_search.md index b56eb84b77aed..5254f93e46d2d 100644 --- a/docs/ecosystem/google_search.md +++ b/docs/integrations/google_search.md @@ -1,4 +1,4 @@ -# Google Search Wrapper +# Google Search This page covers how to use the Google Search API within LangChain. It is broken into two parts: installation and setup, and then references to the specific Google Search wrapper. diff --git a/docs/ecosystem/google_serper.md b/docs/integrations/google_serper.md similarity index 98% rename from docs/ecosystem/google_serper.md rename to docs/integrations/google_serper.md index 56920a6de3115..38590e378c6fa 100644 --- a/docs/ecosystem/google_serper.md +++ b/docs/integrations/google_serper.md @@ -1,4 +1,4 @@ -# Google Serper Wrapper +# Google Serper This page covers how to use the [Serper](https://serper.dev) Google Search API within LangChain. Serper is a low-cost Google Search API that can be used to add answer box, knowledge graph, and organic results data from Google Search. It is broken into two parts: setup, and then references to the specific Google Serper wrapper. diff --git a/docs/ecosystem/gooseai.md b/docs/integrations/gooseai.md similarity index 100% rename from docs/ecosystem/gooseai.md rename to docs/integrations/gooseai.md diff --git a/docs/ecosystem/gpt4all.md b/docs/integrations/gpt4all.md similarity index 100% rename from docs/ecosystem/gpt4all.md rename to docs/integrations/gpt4all.md diff --git a/docs/ecosystem/graphsignal.md b/docs/integrations/graphsignal.md similarity index 100% rename from docs/ecosystem/graphsignal.md rename to docs/integrations/graphsignal.md diff --git a/docs/ecosystem/hazy_research.md b/docs/integrations/hazy_research.md similarity index 100% rename from docs/ecosystem/hazy_research.md rename to docs/integrations/hazy_research.md diff --git a/docs/ecosystem/helicone.md b/docs/integrations/helicone.md similarity index 100% rename from docs/ecosystem/helicone.md rename to docs/integrations/helicone.md diff --git a/docs/ecosystem/huggingface.md b/docs/integrations/huggingface.md similarity index 100% rename from docs/ecosystem/huggingface.md rename to docs/integrations/huggingface.md diff --git a/docs/ecosystem/jina.md b/docs/integrations/jina.md similarity index 100% rename from docs/ecosystem/jina.md rename to docs/integrations/jina.md diff --git a/docs/ecosystem/lancedb.md b/docs/integrations/lancedb.md similarity index 100% rename from docs/ecosystem/lancedb.md rename to docs/integrations/lancedb.md diff --git a/docs/ecosystem/llamacpp.md b/docs/integrations/llamacpp.md similarity index 100% rename from docs/ecosystem/llamacpp.md rename to docs/integrations/llamacpp.md diff --git a/docs/ecosystem/metal.md b/docs/integrations/metal.md similarity index 100% rename from docs/ecosystem/metal.md rename to docs/integrations/metal.md diff --git a/docs/ecosystem/milvus.md b/docs/integrations/milvus.md similarity index 100% rename from docs/ecosystem/milvus.md rename to docs/integrations/milvus.md diff --git a/docs/ecosystem/mlflow_tracking.ipynb b/docs/integrations/mlflow_tracking.ipynb similarity index 100% rename from docs/ecosystem/mlflow_tracking.ipynb rename to docs/integrations/mlflow_tracking.ipynb diff --git a/docs/ecosystem/modal.md b/docs/integrations/modal.md similarity index 100% rename from docs/ecosystem/modal.md rename to docs/integrations/modal.md diff --git a/docs/ecosystem/myscale.md b/docs/integrations/myscale.md similarity index 100% rename from docs/ecosystem/myscale.md rename to docs/integrations/myscale.md diff --git a/docs/ecosystem/nlpcloud.md b/docs/integrations/nlpcloud.md similarity index 100% rename from docs/ecosystem/nlpcloud.md rename to docs/integrations/nlpcloud.md diff --git a/docs/ecosystem/openai.md b/docs/integrations/openai.md similarity index 100% rename from docs/ecosystem/openai.md rename to docs/integrations/openai.md diff --git a/docs/ecosystem/opensearch.md b/docs/integrations/opensearch.md similarity index 100% rename from docs/ecosystem/opensearch.md rename to docs/integrations/opensearch.md diff --git a/docs/ecosystem/openweathermap.md b/docs/integrations/openweathermap.md similarity index 100% rename from docs/ecosystem/openweathermap.md rename to docs/integrations/openweathermap.md diff --git a/docs/ecosystem/petals.md b/docs/integrations/petals.md similarity index 100% rename from docs/ecosystem/petals.md rename to docs/integrations/petals.md diff --git a/docs/ecosystem/pgvector.md b/docs/integrations/pgvector.md similarity index 100% rename from docs/ecosystem/pgvector.md rename to docs/integrations/pgvector.md diff --git a/docs/ecosystem/pinecone.md b/docs/integrations/pinecone.md similarity index 100% rename from docs/ecosystem/pinecone.md rename to docs/integrations/pinecone.md diff --git a/docs/ecosystem/pipelineai.md b/docs/integrations/pipelineai.md similarity index 100% rename from docs/ecosystem/pipelineai.md rename to docs/integrations/pipelineai.md diff --git a/docs/ecosystem/predictionguard.md b/docs/integrations/predictionguard.md similarity index 100% rename from docs/ecosystem/predictionguard.md rename to docs/integrations/predictionguard.md diff --git a/docs/ecosystem/promptlayer.md b/docs/integrations/promptlayer.md similarity index 100% rename from docs/ecosystem/promptlayer.md rename to docs/integrations/promptlayer.md diff --git a/docs/ecosystem/qdrant.md b/docs/integrations/qdrant.md similarity index 100% rename from docs/ecosystem/qdrant.md rename to docs/integrations/qdrant.md diff --git a/docs/ecosystem/rebuff.ipynb b/docs/integrations/rebuff.ipynb similarity index 100% rename from docs/ecosystem/rebuff.ipynb rename to docs/integrations/rebuff.ipynb diff --git a/docs/ecosystem/redis.md b/docs/integrations/redis.md similarity index 100% rename from docs/ecosystem/redis.md rename to docs/integrations/redis.md diff --git a/docs/ecosystem/replicate.md b/docs/integrations/replicate.md similarity index 100% rename from docs/ecosystem/replicate.md rename to docs/integrations/replicate.md diff --git a/docs/ecosystem/runhouse.md b/docs/integrations/runhouse.md similarity index 100% rename from docs/ecosystem/runhouse.md rename to docs/integrations/runhouse.md diff --git a/docs/ecosystem/rwkv.md b/docs/integrations/rwkv.md similarity index 100% rename from docs/ecosystem/rwkv.md rename to docs/integrations/rwkv.md diff --git a/docs/ecosystem/searx.md b/docs/integrations/searx.md similarity index 100% rename from docs/ecosystem/searx.md rename to docs/integrations/searx.md diff --git a/docs/ecosystem/serpapi.md b/docs/integrations/serpapi.md similarity index 100% rename from docs/ecosystem/serpapi.md rename to docs/integrations/serpapi.md diff --git a/docs/ecosystem/stochasticai.md b/docs/integrations/stochasticai.md similarity index 100% rename from docs/ecosystem/stochasticai.md rename to docs/integrations/stochasticai.md diff --git a/docs/ecosystem/tair.md b/docs/integrations/tair.md similarity index 100% rename from docs/ecosystem/tair.md rename to docs/integrations/tair.md diff --git a/docs/ecosystem/unstructured.md b/docs/integrations/unstructured.md similarity index 100% rename from docs/ecosystem/unstructured.md rename to docs/integrations/unstructured.md diff --git a/docs/ecosystem/wandb_tracking.ipynb b/docs/integrations/wandb_tracking.ipynb similarity index 100% rename from docs/ecosystem/wandb_tracking.ipynb rename to docs/integrations/wandb_tracking.ipynb diff --git a/docs/ecosystem/weaviate.md b/docs/integrations/weaviate.md similarity index 100% rename from docs/ecosystem/weaviate.md rename to docs/integrations/weaviate.md diff --git a/docs/ecosystem/wolfram_alpha.md b/docs/integrations/wolfram_alpha.md similarity index 100% rename from docs/ecosystem/wolfram_alpha.md rename to docs/integrations/wolfram_alpha.md diff --git a/docs/ecosystem/writer.md b/docs/integrations/writer.md similarity index 100% rename from docs/ecosystem/writer.md rename to docs/integrations/writer.md diff --git a/docs/ecosystem/yeagerai.md b/docs/integrations/yeagerai.md similarity index 100% rename from docs/ecosystem/yeagerai.md rename to docs/integrations/yeagerai.md diff --git a/docs/ecosystem/zilliz.md b/docs/integrations/zilliz.md similarity index 100% rename from docs/ecosystem/zilliz.md rename to docs/integrations/zilliz.md diff --git a/docs/modules/agents/tools/getting_started.md b/docs/modules/agents/tools/getting_started.md index 0e496a40aaf7e..e6f5832f71883 100644 --- a/docs/modules/agents/tools/getting_started.md +++ b/docs/modules/agents/tools/getting_started.md @@ -118,7 +118,7 @@ Below is a list of all supported tools and relevant information: - Notes: Uses the Google Custom Search API - Requires LLM: No - Extra Parameters: `google_api_key`, `google_cse_id` -- For more information on this, see [this page](../../../ecosystem/google_search.md) +- For more information on this, see [this page](../../../integrations/google_search.md) **searx-search** @@ -135,7 +135,7 @@ Below is a list of all supported tools and relevant information: - Notes: Calls the [serper.dev](https://serper.dev) Google Search API and then parses results. - Requires LLM: No - Extra Parameters: `serper_api_key` -- For more information on this, see [this page](../../../ecosystem/google_serper.md) +- For more information on this, see [this page](../../../integrations/google_serper.md) **wikipedia** diff --git a/docs/reference/integrations.md b/docs/reference/integrations.md deleted file mode 100644 index 8e57ee69ec6da..0000000000000 --- a/docs/reference/integrations.md +++ /dev/null @@ -1,68 +0,0 @@ -# Integrations - -Besides the installation of this python package, you will also need to install packages and set environment variables depending on which chains you want to use. - -Note: the reason these packages are not included in the dependencies by default is that as we imagine scaling this package, we do not want to force dependencies that are not needed. - -The following use cases require specific installs and api keys: - -- _OpenAI_: - - Install requirements with `pip install openai` - - Get an OpenAI api key and either set it as an environment variable (`OPENAI_API_KEY`) or pass it to the LLM constructor as `openai_api_key`. -- _Cohere_: - - Install requirements with `pip install cohere` - - Get a Cohere api key and either set it as an environment variable (`COHERE_API_KEY`) or pass it to the LLM constructor as `cohere_api_key`. -- _GooseAI_: - - Install requirements with `pip install openai` - - Get an GooseAI api key and either set it as an environment variable (`GOOSEAI_API_KEY`) or pass it to the LLM constructor as `gooseai_api_key`. -- _Hugging Face Hub_ - - Install requirements with `pip install huggingface_hub` - - Get a Hugging Face Hub api token and either set it as an environment variable (`HUGGINGFACEHUB_API_TOKEN`) or pass it to the LLM constructor as `huggingfacehub_api_token`. -- _Petals_: - - Install requirements with `pip install petals` - - Get an GooseAI api key and either set it as an environment variable (`HUGGINGFACE_API_KEY`) or pass it to the LLM constructor as `huggingface_api_key`. -- _CerebriumAI_: - - Install requirements with `pip install cerebrium` - - Get a Cerebrium api key and either set it as an environment variable (`CEREBRIUMAI_API_KEY`) or pass it to the LLM constructor as `cerebriumai_api_key`. -- _PromptLayer_: - - Install requirements with `pip install promptlayer` (be sure to be on version 0.1.62 or higher) - - Get an API key from [promptlayer.com](http://www.promptlayer.com) and set it using `promptlayer.api_key=` -- _SerpAPI_: - - Install requirements with `pip install google-search-results` - - Get a SerpAPI api key and either set it as an environment variable (`SERPAPI_API_KEY`) or pass it to the LLM constructor as `serpapi_api_key`. -- _GoogleSearchAPI_: - - Install requirements with `pip install google-api-python-client` - - Get a Google api key and either set it as an environment variable (`GOOGLE_API_KEY`) or pass it to the LLM constructor as `google_api_key`. You will also need to set the `GOOGLE_CSE_ID` environment variable to your custom search engine id. You can pass it to the LLM constructor as `google_cse_id` as well. -- _WolframAlphaAPI_: - - Install requirements with `pip install wolframalpha` - - Get a Wolfram Alpha api key and either set it as an environment variable (`WOLFRAM_ALPHA_APPID`) or pass it to the LLM constructor as `wolfram_alpha_appid`. -- _NatBot_: - - Install requirements with `pip install playwright` -- _Wikipedia_: - - Install requirements with `pip install wikipedia` -- _Elasticsearch_: - - Install requirements with `pip install elasticsearch` - - Set up Elasticsearch backend. If you want to do locally, [this](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/getting-started.html) is a good guide. -- _FAISS_: - - Install requirements with `pip install faiss` for Python 3.7 and `pip install faiss-cpu` for Python 3.10+. -- _MyScale_ - - Install requirements with `pip install clickhouse-connect`. For documentations, please refer to [this document](https://docs.myscale.com/en/overview/). -- _Manifest_: - - Install requirements with `pip install manifest-ml` (Note: this is only available in Python 3.8+ currently). -- _OpenSearch_: - - Install requirements with `pip install opensearch-py` - - If you want to set up OpenSearch on your local, [here](https://opensearch.org/docs/latest/) -- _DeepLake_: - - Install requirements with `pip install deeplake` -- _LlamaCpp_: - - Install requirements with `pip install llama-cpp-python` - - Download model and convert following [llama.cpp instructions](https://github.com/ggerganov/llama.cpp) -- _Milvus_: - - Install requirements with `pip install pymilvus` - - In order to setup a local cluster, take a look [here](https://milvus.io/docs). -- _Zilliz_: - - Install requirements with `pip install pymilvus` - - To get up and running, take a look [here](https://zilliz.com/doc/quick_start). - - -If you are using the `NLTKTextSplitter` or the `SpacyTextSplitter`, you will also need to install the appropriate models. For example, if you want to use the `SpacyTextSplitter`, you will need to install the `en_core_web_sm` model with `python -m spacy download en_core_web_sm`. Similarly, if you want to use the `NLTKTextSplitter`, you will need to install the `punkt` model with `python -m nltk.downloader punkt`. diff --git a/langchain/schema.py b/langchain/schema.py index 21552b9b38da0..61c536ddfc827 100644 --- a/langchain/schema.py +++ b/langchain/schema.py @@ -315,7 +315,7 @@ class BaseOutputParser(BaseModel, ABC, Generic[T]): def parse(self, text: str) -> T: """Parse the output of an LLM call. - A method which takes in a string (assumed output of language model ) + A method which takes in a string (assumed output of a language model ) and parses it into some structure. Args: diff --git a/langchain/utilities/searx_search.py b/langchain/utilities/searx_search.py index b2ed08058ac6b..4c780f277a94f 100644 --- a/langchain/utilities/searx_search.py +++ b/langchain/utilities/searx_search.py @@ -7,7 +7,7 @@ `_ specification. -More detailes on the installtion instructions `here. <../../ecosystem/searx.html>`_ +More detailes on the installtion instructions `here. <../../integrations/searx.html>`_ For the search API refer to https://docs.searxng.org/dev/search_api.html