docs:Fix Imports for Document and BaseRetriever (#29473)

This pull request addresses an issue with import statements in the
langchain_core/retrievers.py file. The following changes have been made:

Corrected the import for Document from langchain_core.documents.base.
Corrected the import for BaseRetriever from langchain_core.retrievers.
These changes ensure that the SimpleRetriever class can correctly
reference the Document and BaseRetriever classes, improving code
reliability and maintainability.

---------

Co-authored-by: Matheus Torquato <mtorquat@jaguarlandrover.com>
Co-authored-by: Chester Curme <chester.curme@gmail.com>
This commit is contained in:
Matheus Torquato 2025-01-29 14:32:05 +00:00 committed by GitHub
parent 12bcc85927
commit 7aae738296
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -88,7 +88,8 @@ class BaseRetriever(RunnableSerializable[RetrieverInput, RetrieverOutput], ABC):
.. code-block:: python .. code-block:: python
from langchain_core import Document, BaseRetriever from langchain_core.documents import Document
from langchain_core.retrievers import BaseRetriever
from typing import List from typing import List
class SimpleRetriever(BaseRetriever): class SimpleRetriever(BaseRetriever):