mirror of
https://github.com/hwchase17/langchain.git
synced 2026-02-21 14:43:07 +00:00
qxqx
This commit is contained in:
@@ -15,8 +15,8 @@ from langchain_core.indexing.base import (
|
||||
|
||||
__all__ = [
|
||||
"aindex",
|
||||
"index",
|
||||
"BaseIndex",
|
||||
"index",
|
||||
"IndexingResult",
|
||||
"InMemoryRecordManager",
|
||||
"RecordManager",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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__)
|
||||
|
||||
|
||||
@@ -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",
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user