langchain: dosctore import fix (#20678)

Cleaned up imports
This commit is contained in:
Leonid Ganeline 2024-04-19 18:41:36 -07:00 committed by GitHub
parent 3a750e130c
commit d6470aab60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -112,13 +112,13 @@ def __getattr__(name: str) -> Any:
return VectorDBQAWithSourcesChain
elif name == "InMemoryDocstore":
from langchain.docstore import InMemoryDocstore
from langchain_community.docstore import InMemoryDocstore
_warn_on_import(name, replacement="langchain.docstore.InMemoryDocstore")
return InMemoryDocstore
elif name == "Wikipedia":
from langchain.docstore import Wikipedia
from langchain_community.docstore import Wikipedia
_warn_on_import(name, replacement="langchain.docstore.Wikipedia")

View File

@ -1,6 +1,7 @@
"""Chain that implements the ReAct paper from https://arxiv.org/pdf/2210.03629.pdf."""
from typing import Any, List, Optional, Sequence
from langchain_community.docstore.base import Docstore
from langchain_core._api import deprecated
from langchain_core.documents import Document
from langchain_core.language_models import BaseLanguageModel
@ -14,7 +15,6 @@ from langchain.agents.react.output_parser import ReActOutputParser
from langchain.agents.react.textworld_prompt import TEXTWORLD_PROMPT
from langchain.agents.react.wiki_prompt import WIKI_PROMPT
from langchain.agents.utils import validate_tools_single_input
from langchain.docstore.base import Docstore
@deprecated("0.1.0", removal="0.2.0")