This commit is contained in:
Eugene Yurtsev
2024-07-12 16:46:08 -04:00
parent f7be71521e
commit 3c6a7fcc8f
4 changed files with 9 additions and 8 deletions

View File

@@ -15,8 +15,8 @@ from langchain_core.indexing.base import (
__all__ = [
"aindex",
"index",
"BaseIndex",
"index",
"IndexingResult",
"InMemoryRecordManager",
"RecordManager",

View File

@@ -7,18 +7,18 @@ from typing import (
Any,
AsyncIterable,
AsyncIterator,
Dict,
Generic,
Iterable,
Iterator,
List,
Literal,
NotRequired,
Optional,
Sequence,
TypedDict,
TypeVar,
Optional,
Union,
Dict,
Literal,
)
from langchain_core._api import beta
@@ -110,7 +110,7 @@ class DeleteResponse(TypedDict, total=False):
"""
class BaseIndex(Generic[T, Q]):
class BaseIndex(Generic[T]):
"""A collection of items that can be queried.
This indexing interface is designed to be a generic abstraction for storing and

View File

@@ -57,7 +57,7 @@ if TYPE_CHECKING:
from langchain_core.indexing.base import UpsertResponse
from langchain_core.documents.base import Document
from langchain_core.indexing.base_index import BaseIndex
from langchain_core.indexing import BaseIndex
logger = logging.getLogger(__name__)

View File

@@ -4,11 +4,12 @@ from langchain_core.indexing import __all__
def test_all() -> None:
"""Use to catch obvious breaking changes."""
assert __all__ == sorted(__all__, key=str.lower)
assert __all__ == [
assert set(__all__) == {
"aindex",
"BaseIndex",
"index",
"IndexingResult",
"InMemoryRecordManager",
"RecordManager",
"UpsertResponse",
]
}