From 2de59d0b3efacc8e883d3e5894ec2d08e56a3137 Mon Sep 17 00:00:00 2001 From: Zapiron <125368863+DangerousPotential@users.noreply.github.com> Date: Sun, 17 Nov 2024 05:31:31 +0800 Subject: [PATCH 1/6] docs: Fixed mini typo (#28149) Fix mini typo from objets to objects --- docs/docs/versions/v0_3/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/versions/v0_3/index.mdx b/docs/docs/versions/v0_3/index.mdx index f8cba890d7420..f553ab1986616 100644 --- a/docs/docs/versions/v0_3/index.mdx +++ b/docs/docs/versions/v0_3/index.mdx @@ -132,7 +132,7 @@ should ensure that they are passing Pydantic 2 objects to these APIs rather than Pydantic 1 objects (created via the `pydantic.v1` namespace of pydantic 2). :::caution -While `v1` objets may be accepted by some of these APIs, users are advised to +While `v1` objects may be accepted by some of these APIs, users are advised to use Pydantic 2 objects to avoid future issues. ::: From 3b602d0453b48451bbcecbfee599e35e1860e902 Mon Sep 17 00:00:00 2001 From: Alexey Morozov <36787333+amrzv@users.noreply.github.com> Date: Sun, 17 Nov 2024 00:51:30 +0300 Subject: [PATCH 2/6] docs: Added missing installation for required packages in tutorial notebooks (#28156) **Description:** some of the required packages are missing in the installation cell in tutorial notebooks. So I added required packages to installation cell or created latter one if it was not presented in the notebook at all. Tested in colab: "Kernel" -> "Run all cells". All the notebooks under `docs/tutorials` run as expected without `ModuleNotFoundError` error. --------- Co-authored-by: Chester Curme --- docs/docs/tutorials/summarization.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/tutorials/summarization.ipynb b/docs/docs/tutorials/summarization.ipynb index c63f4c6479140..1669f5f071dce 100644 --- a/docs/docs/tutorials/summarization.ipynb +++ b/docs/docs/tutorials/summarization.ipynb @@ -156,7 +156,7 @@ "metadata": {}, "outputs": [], "source": [ - "%pip install --upgrade --quiet tiktoken langchain langgraph beautifulsoup4\n", + "%pip install --upgrade --quiet tiktoken langchain langgraph beautifulsoup4 langchain-community\n", "\n", "# Set env var OPENAI_API_KEY or load from a .env file\n", "# import dotenv\n", From 0b2bea4c0e8779edd2d55eaae50fc41f7942cc6e Mon Sep 17 00:00:00 2001 From: Zapiron <125368863+DangerousPotential@users.noreply.github.com> Date: Sun, 17 Nov 2024 05:57:55 +0800 Subject: [PATCH 3/6] docs: Resolve incorrect import for `AttributeInfo` (#28154) `AttributeInfo` is incorrectly imported from `langchain.chains.query_constructor.base` instead of `langchain.chains.query_constructor.schema` --- docs/docs/how_to/self_query.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/how_to/self_query.ipynb b/docs/docs/how_to/self_query.ipynb index 06151f12d3d05..b85f4c9596449 100644 --- a/docs/docs/how_to/self_query.ipynb +++ b/docs/docs/how_to/self_query.ipynb @@ -95,7 +95,7 @@ "metadata": {}, "outputs": [], "source": [ - "from langchain.chains.query_constructor.base import AttributeInfo\n", + "from langchain.chains.query_constructor.schema import AttributeInfo\n", "from langchain.retrievers.self_query.base import SelfQueryRetriever\n", "from langchain_openai import ChatOpenAI\n", "\n", From e6fe8cc2fbf53a071816b59d9cdf997590e1d36c Mon Sep 17 00:00:00 2001 From: Zapiron <125368863+DangerousPotential@users.noreply.github.com> Date: Sun, 17 Nov 2024 05:59:35 +0800 Subject: [PATCH 4/6] docs: Fix wrong import of `AttributeInfo` (#28155) Fix wrong import of `AttributeInfo` from `langchain.chains.query_constructor.base` to `langchain.chains.query_constructor.schema` --- .../retrievers/self_query/elasticsearch_self_query.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/integrations/retrievers/self_query/elasticsearch_self_query.ipynb b/docs/docs/integrations/retrievers/self_query/elasticsearch_self_query.ipynb index c5830e7db688f..59a4c2fa518c6 100644 --- a/docs/docs/integrations/retrievers/self_query/elasticsearch_self_query.ipynb +++ b/docs/docs/integrations/retrievers/self_query/elasticsearch_self_query.ipynb @@ -136,7 +136,7 @@ }, "outputs": [], "source": [ - "from langchain.chains.query_constructor.base import AttributeInfo\n", + "from langchain.chains.query_constructor.schema import AttributeInfo\n", "from langchain.retrievers.self_query.base import SelfQueryRetriever\n", "from langchain_openai import OpenAI\n", "\n", From 0a57fc001658a4034c656c65cba148f666cc0bcb Mon Sep 17 00:00:00 2001 From: Eric Pinzur <2641606+epinzur@users.noreply.github.com> Date: Sat, 16 Nov 2024 23:07:42 +0100 Subject: [PATCH 5/6] community: OpenSearchVectorStore: use engine set at init() time by default (#28147) Description: * Updated the OpenSearchVectorStore to use the `engine` parameter captured at `init()` time as the default when adding documents to the store. Formatted, Linted, and Tested. --- .../vectorstores/opensearch_vector_search.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/community/langchain_community/vectorstores/opensearch_vector_search.py b/libs/community/langchain_community/vectorstores/opensearch_vector_search.py index 3e5bb280035a4..f08620eef6383 100644 --- a/libs/community/langchain_community/vectorstores/opensearch_vector_search.py +++ b/libs/community/langchain_community/vectorstores/opensearch_vector_search.py @@ -401,7 +401,7 @@ def __init__( self.is_aoss = _is_aoss_enabled(http_auth=http_auth) self.client = _get_opensearch_client(opensearch_url, **kwargs) self.async_client = _get_async_opensearch_client(opensearch_url, **kwargs) - self.engine = kwargs.get("engine") + self.engine = kwargs.get("engine", "nmslib") @property def embeddings(self) -> Embeddings: @@ -420,7 +420,7 @@ def __add( index_name = kwargs.get("index_name", self.index_name) text_field = kwargs.get("text_field", "text") dim = len(embeddings[0]) - engine = kwargs.get("engine", "nmslib") + engine = kwargs.get("engine", self.engine) space_type = kwargs.get("space_type", "l2") ef_search = kwargs.get("ef_search", 512) ef_construction = kwargs.get("ef_construction", 512) @@ -461,7 +461,7 @@ async def __aadd( index_name = kwargs.get("index_name", self.index_name) text_field = kwargs.get("text_field", "text") dim = len(embeddings[0]) - engine = kwargs.get("engine", "nmslib") + engine = kwargs.get("engine", self.engine) space_type = kwargs.get("space_type", "l2") ef_search = kwargs.get("ef_search", 512) ef_construction = kwargs.get("ef_construction", 512) @@ -530,7 +530,7 @@ def create_index( ) if is_appx_search: - engine = kwargs.get("engine", "nmslib") + engine = kwargs.get("engine", self.engine) space_type = kwargs.get("space_type", "l2") ef_search = kwargs.get("ef_search", 512) ef_construction = kwargs.get("ef_construction", 512) From 76e210a34964aa264bc49aa2b583d725694caf8d Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Sat, 16 Nov 2024 22:37:58 -0500 Subject: [PATCH 6/6] docs: link to langgraph platform (#28150) Link to langgraph platform --- README.md | 2 +- docs/docs/introduction.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ee4f1018ed27f..f3e64b60cdb7f 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ Please see [here](https://python.langchain.com) for full documentation, which in - [πŸ¦œπŸ› οΈ LangSmith](https://docs.smith.langchain.com/): Trace and evaluate your language model applications and intelligent agents to help you move from prototype to production. - [πŸ¦œπŸ•ΈοΈ LangGraph](https://langchain-ai.github.io/langgraph/): Create stateful, multi-actor applications with LLMs. Integrates smoothly with LangChain, but can be used without it. -- [πŸ¦œπŸ“ LangServe](https://python.langchain.com/docs/langserve): Deploy LangChain runnables and chains as REST APIs. +- [πŸ¦œπŸ•ΈοΈ LangGraph Platform](https://langchain-ai.github.io/langgraph/concepts/#langgraph-platform): Deploy LLM applications built with LangGraph into production. ## πŸ’ Contributing diff --git a/docs/docs/introduction.mdx b/docs/docs/introduction.mdx index 68d7aaa41868d..b3edcfbd15dff 100644 --- a/docs/docs/introduction.mdx +++ b/docs/docs/introduction.mdx @@ -33,7 +33,7 @@ Concretely, the framework consists of the following open-source libraries: - **`langchain`**: Chains, agents, and retrieval strategies that make up an application's cognitive architecture. - **`langchain-community`**: Third-party integrations that are community maintained. - **[LangGraph](https://langchain-ai.github.io/langgraph)**: Build robust and stateful multi-actor applications with LLMs by modeling steps as edges and nodes in a graph. Integrates smoothly with LangChain, but can be used without it. -- **[LangServe](/docs/langserve)**: Deploy LangChain chains as REST APIs. +- **[LangGraphPlatform](https://langchain-ai.github.io/langgraph/concepts/#langgraph-platform)**: Deploy LLM applications built with LangGraph to production. - **[LangSmith](https://docs.smith.langchain.com)**: A developer platform that lets you debug, test, evaluate, and monitor LLM applications.