Skip to content

Commit 7995c71

Browse files
authored
chore(langchain_v1): clean anything uncertain (#32228)
Further clean up of namespace: - Removed prompts (we'll re-add in a separate commit) - Remove LocalFileStore until we can review whether all the implementation details are necessary - Remove message processing logic from memory (we'll figure out where to expose it) - Remove `Tool` primitive (should be sufficient to use `BaseTool` for typing purposes) - Remove utilities to create kv stores. Unclear if they've had much usage outside MultiparentRetriever
1 parent bdf1cd3 commit 7995c71

File tree

18 files changed

+8
-577
lines changed

18 files changed

+8
-577
lines changed

β€Ž.github/workflows/pr_lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ jobs:
8181
core
8282
cli
8383
langchain
84+
langchain_v1
8485
standard-tests
8586
text-splitters
8687
docs

β€Žlibs/langchain_v1/.dockerignore

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
1-
"""**Chat Models** are a variation on language models.
2-
3-
While Chat Models use language models under the hood, the interface they expose
4-
is a bit different. Rather than expose a "text in, text out" API, they expose
5-
an interface where "chat messages" are the inputs and outputs.
6-
7-
**Class hierarchy:**
8-
9-
.. code-block::
10-
11-
BaseLanguageModel --> BaseChatModel --> <name> # Examples: ChatOpenAI, ChatGooglePalm
12-
13-
**Main helpers:**
14-
15-
.. code-block::
16-
17-
AIMessage, BaseMessage, HumanMessage
18-
""" # noqa: E501
1+
from langchain_core.language_models import BaseChatModel
192

203
from langchain.chat_models.base import init_chat_model
214

22-
__all__ = [
23-
"init_chat_model",
24-
]
5+
__all__ = ["BaseChatModel", "init_chat_model"]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
from langchain_core.embeddings import Embeddings
2+
13
from langchain.embeddings.base import init_embeddings
24
from langchain.embeddings.cache import CacheBackedEmbeddings
35

46
__all__ = [
57
"CacheBackedEmbeddings",
8+
"Embeddings",
69
"init_embeddings",
710
]

β€Žlibs/langchain_v1/langchain/memory/__init__.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

β€Žlibs/langchain_v1/langchain/prompts/__init__.py

Lines changed: 0 additions & 39 deletions
This file was deleted.

β€Žlibs/langchain_v1/langchain/storage/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,11 @@
1212
InvalidKeyException,
1313
)
1414

15-
from langchain.storage._lc_store import create_kv_docstore, create_lc_store
1615
from langchain.storage.encoder_backed import EncoderBackedStore
17-
from langchain.storage.file_system import LocalFileStore
1816

1917
__all__ = [
2018
"EncoderBackedStore",
2119
"InMemoryByteStore",
2220
"InMemoryStore",
2321
"InvalidKeyException",
24-
"LocalFileStore",
25-
"create_kv_docstore",
26-
"create_lc_store",
2722
]

β€Žlibs/langchain_v1/langchain/storage/_lc_store.py

Lines changed: 0 additions & 91 deletions
This file was deleted.

β€Žlibs/langchain_v1/langchain/storage/file_system.py

Lines changed: 0 additions & 176 deletions
This file was deleted.

0 commit comments

Comments
Β (0)