Skip to content

Commit

Permalink
core[minor],langchain[patch]: Move base indexing interface and logic …
Browse files Browse the repository at this point in the history
…to core (#20667)

This PR moves the interface and the logic to core.

The following changes to namespaces:


`indexes` -> `indexing`
`indexes._api` -> `indexing.api`


Testing code is intentionally duplicated for now since it's testing
different
implementations of the record manager (in-memory vs. SQL).

Common logic will need to be pulled out into the test client.


A follow up PR will move the SQL based implementation outside of
LangChain.
  • Loading branch information
eyurtsev authored and hinthornw committed Apr 26, 2024
1 parent df87cd2 commit f0a579b
Show file tree
Hide file tree
Showing 12 changed files with 2,436 additions and 609 deletions.
15 changes: 15 additions & 0 deletions libs/core/langchain_core/indexing/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""Code to help indexing data into a vectorstore.
This package contains helper logic to help deal with indexing data into
a vectorstore while avoiding duplicated content and over-writing content
if it's unchanged.
"""
from langchain_core.indexing.api import IndexingResult, aindex, index
from langchain_core.indexing.base import RecordManager

__all__ = [
"aindex",
"index",
"IndexingResult",
"RecordManager",
]
Loading

0 comments on commit f0a579b

Please sign in to comment.