langchain-core 1.0.0a8__py3-none-any.whl → 1.0.0rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of langchain-core might be problematic. Click here for more details.
- langchain_core/__init__.py +1 -1
- langchain_core/_api/__init__.py +0 -1
- langchain_core/_api/beta_decorator.py +17 -20
- langchain_core/_api/deprecation.py +30 -35
- langchain_core/_import_utils.py +1 -1
- langchain_core/agents.py +7 -6
- langchain_core/caches.py +4 -10
- langchain_core/callbacks/__init__.py +1 -8
- langchain_core/callbacks/base.py +232 -243
- langchain_core/callbacks/file.py +33 -33
- langchain_core/callbacks/manager.py +353 -416
- langchain_core/callbacks/stdout.py +21 -22
- langchain_core/callbacks/streaming_stdout.py +32 -32
- langchain_core/callbacks/usage.py +54 -51
- langchain_core/chat_history.py +42 -57
- langchain_core/document_loaders/langsmith.py +21 -21
- langchain_core/documents/__init__.py +0 -1
- langchain_core/documents/base.py +37 -40
- langchain_core/documents/transformers.py +28 -29
- langchain_core/embeddings/fake.py +46 -52
- langchain_core/exceptions.py +5 -5
- langchain_core/indexing/api.py +11 -11
- langchain_core/indexing/base.py +24 -24
- langchain_core/language_models/__init__.py +0 -2
- langchain_core/language_models/_utils.py +51 -53
- langchain_core/language_models/base.py +23 -24
- langchain_core/language_models/chat_models.py +121 -144
- langchain_core/language_models/fake_chat_models.py +5 -5
- langchain_core/language_models/llms.py +10 -12
- langchain_core/load/dump.py +1 -1
- langchain_core/load/load.py +16 -16
- langchain_core/load/serializable.py +35 -34
- langchain_core/messages/__init__.py +1 -16
- langchain_core/messages/ai.py +105 -104
- langchain_core/messages/base.py +26 -26
- langchain_core/messages/block_translators/__init__.py +17 -17
- langchain_core/messages/block_translators/anthropic.py +2 -2
- langchain_core/messages/block_translators/bedrock_converse.py +2 -2
- langchain_core/messages/block_translators/google_genai.py +2 -2
- langchain_core/messages/block_translators/groq.py +117 -21
- langchain_core/messages/block_translators/langchain_v0.py +2 -2
- langchain_core/messages/block_translators/openai.py +4 -4
- langchain_core/messages/chat.py +1 -1
- langchain_core/messages/content.py +189 -193
- langchain_core/messages/function.py +5 -5
- langchain_core/messages/human.py +15 -17
- langchain_core/messages/modifier.py +1 -1
- langchain_core/messages/system.py +12 -14
- langchain_core/messages/tool.py +45 -49
- langchain_core/messages/utils.py +384 -396
- langchain_core/output_parsers/__init__.py +1 -14
- langchain_core/output_parsers/base.py +22 -23
- langchain_core/output_parsers/json.py +3 -3
- langchain_core/output_parsers/list.py +1 -1
- langchain_core/output_parsers/openai_functions.py +46 -44
- langchain_core/output_parsers/openai_tools.py +7 -7
- langchain_core/output_parsers/pydantic.py +10 -11
- langchain_core/output_parsers/string.py +1 -1
- langchain_core/output_parsers/transform.py +2 -2
- langchain_core/output_parsers/xml.py +1 -1
- langchain_core/outputs/__init__.py +1 -1
- langchain_core/outputs/chat_generation.py +14 -14
- langchain_core/outputs/generation.py +5 -5
- langchain_core/outputs/llm_result.py +5 -5
- langchain_core/prompt_values.py +5 -5
- langchain_core/prompts/__init__.py +3 -23
- langchain_core/prompts/base.py +32 -37
- langchain_core/prompts/chat.py +216 -222
- langchain_core/prompts/dict.py +2 -2
- langchain_core/prompts/few_shot.py +76 -83
- langchain_core/prompts/few_shot_with_templates.py +6 -8
- langchain_core/prompts/image.py +11 -13
- langchain_core/prompts/loading.py +1 -1
- langchain_core/prompts/message.py +2 -2
- langchain_core/prompts/prompt.py +14 -16
- langchain_core/prompts/string.py +19 -7
- langchain_core/prompts/structured.py +24 -25
- langchain_core/rate_limiters.py +36 -38
- langchain_core/retrievers.py +41 -182
- langchain_core/runnables/base.py +565 -590
- langchain_core/runnables/branch.py +7 -7
- langchain_core/runnables/config.py +37 -44
- langchain_core/runnables/configurable.py +8 -9
- langchain_core/runnables/fallbacks.py +8 -8
- langchain_core/runnables/graph.py +28 -27
- langchain_core/runnables/graph_ascii.py +19 -18
- langchain_core/runnables/graph_mermaid.py +20 -31
- langchain_core/runnables/graph_png.py +7 -7
- langchain_core/runnables/history.py +20 -20
- langchain_core/runnables/passthrough.py +8 -8
- langchain_core/runnables/retry.py +3 -3
- langchain_core/runnables/router.py +1 -1
- langchain_core/runnables/schema.py +33 -33
- langchain_core/runnables/utils.py +30 -34
- langchain_core/stores.py +72 -102
- langchain_core/sys_info.py +27 -29
- langchain_core/tools/__init__.py +1 -14
- langchain_core/tools/base.py +63 -63
- langchain_core/tools/convert.py +92 -92
- langchain_core/tools/render.py +9 -9
- langchain_core/tools/retriever.py +1 -1
- langchain_core/tools/simple.py +6 -7
- langchain_core/tools/structured.py +17 -18
- langchain_core/tracers/__init__.py +1 -9
- langchain_core/tracers/base.py +35 -35
- langchain_core/tracers/context.py +12 -17
- langchain_core/tracers/event_stream.py +3 -3
- langchain_core/tracers/langchain.py +8 -8
- langchain_core/tracers/log_stream.py +17 -18
- langchain_core/tracers/memory_stream.py +2 -2
- langchain_core/tracers/schemas.py +0 -129
- langchain_core/utils/aiter.py +31 -31
- langchain_core/utils/env.py +5 -5
- langchain_core/utils/function_calling.py +48 -120
- langchain_core/utils/html.py +4 -4
- langchain_core/utils/input.py +2 -2
- langchain_core/utils/interactive_env.py +1 -1
- langchain_core/utils/iter.py +19 -19
- langchain_core/utils/json.py +1 -1
- langchain_core/utils/json_schema.py +2 -2
- langchain_core/utils/mustache.py +5 -5
- langchain_core/utils/pydantic.py +17 -17
- langchain_core/utils/strings.py +4 -4
- langchain_core/utils/utils.py +25 -28
- langchain_core/vectorstores/base.py +43 -64
- langchain_core/vectorstores/in_memory.py +83 -85
- langchain_core/version.py +1 -1
- {langchain_core-1.0.0a8.dist-info → langchain_core-1.0.0rc1.dist-info}/METADATA +23 -11
- langchain_core-1.0.0rc1.dist-info/RECORD +172 -0
- langchain_core/memory.py +0 -120
- langchain_core/pydantic_v1/__init__.py +0 -30
- langchain_core/pydantic_v1/dataclasses.py +0 -23
- langchain_core/pydantic_v1/main.py +0 -23
- langchain_core-1.0.0a8.dist-info/RECORD +0 -176
- {langchain_core-1.0.0a8.dist-info → langchain_core-1.0.0rc1.dist-info}/WHEEL +0 -0
|
@@ -38,126 +38,124 @@ class InMemoryVectorStore(VectorStore):
|
|
|
38
38
|
Uses a dictionary, and computes cosine similarity for search using numpy.
|
|
39
39
|
|
|
40
40
|
Setup:
|
|
41
|
-
Install
|
|
41
|
+
Install `langchain-core`.
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
```bash
|
|
44
|
+
pip install -U langchain-core
|
|
45
|
+
```
|
|
46
46
|
|
|
47
47
|
Key init args — indexing params:
|
|
48
48
|
embedding_function: Embeddings
|
|
49
49
|
Embedding function to use.
|
|
50
50
|
|
|
51
51
|
Instantiate:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
from langchain_openai import OpenAIEmbeddings
|
|
52
|
+
```python
|
|
53
|
+
from langchain_core.vectorstores import InMemoryVectorStore
|
|
54
|
+
from langchain_openai import OpenAIEmbeddings
|
|
56
55
|
|
|
57
|
-
|
|
56
|
+
vector_store = InMemoryVectorStore(OpenAIEmbeddings())
|
|
57
|
+
```
|
|
58
58
|
|
|
59
59
|
Add Documents:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
from langchain_core.documents import Document
|
|
60
|
+
```python
|
|
61
|
+
from langchain_core.documents import Document
|
|
63
62
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
document_1 = Document(id="1", page_content="foo", metadata={"baz": "bar"})
|
|
64
|
+
document_2 = Document(id="2", page_content="thud", metadata={"bar": "baz"})
|
|
65
|
+
document_3 = Document(id="3", page_content="i will be deleted :(")
|
|
67
66
|
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
documents = [document_1, document_2, document_3]
|
|
68
|
+
vector_store.add_documents(documents=documents)
|
|
69
|
+
```
|
|
70
70
|
|
|
71
71
|
Inspect documents:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
72
|
+
```python
|
|
73
|
+
top_n = 10
|
|
74
|
+
for index, (id, doc) in enumerate(vector_store.store.items()):
|
|
75
|
+
if index < top_n:
|
|
76
|
+
# docs have keys 'id', 'vector', 'text', 'metadata'
|
|
77
|
+
print(f"{id}: {doc['text']}")
|
|
78
|
+
else:
|
|
79
|
+
break
|
|
80
|
+
```
|
|
81
81
|
|
|
82
82
|
Delete Documents:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
```python
|
|
84
|
+
vector_store.delete(ids=["3"])
|
|
85
|
+
```
|
|
86
86
|
|
|
87
87
|
Search:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
```python
|
|
89
|
+
results = vector_store.similarity_search(query="thud", k=1)
|
|
90
|
+
for doc in results:
|
|
91
|
+
print(f"* {doc.page_content} [{doc.metadata}]")
|
|
92
|
+
```
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
```txt
|
|
95
|
+
* thud [{'bar': 'baz'}]
|
|
96
|
+
```
|
|
97
97
|
|
|
98
98
|
Search with filter:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
return doc.metadata.get("bar") == "baz"
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
results = vector_store.similarity_search(
|
|
106
|
-
query="thud", k=1, filter=_filter_function
|
|
107
|
-
)
|
|
108
|
-
for doc in results:
|
|
109
|
-
print(f"* {doc.page_content} [{doc.metadata}]")
|
|
99
|
+
```python
|
|
100
|
+
def _filter_function(doc: Document) -> bool:
|
|
101
|
+
return doc.metadata.get("bar") == "baz"
|
|
110
102
|
|
|
111
|
-
.. code-block::
|
|
112
103
|
|
|
113
|
-
|
|
104
|
+
results = vector_store.similarity_search(
|
|
105
|
+
query="thud", k=1, filter=_filter_function
|
|
106
|
+
)
|
|
107
|
+
for doc in results:
|
|
108
|
+
print(f"* {doc.page_content} [{doc.metadata}]")
|
|
109
|
+
```
|
|
114
110
|
|
|
111
|
+
```txt
|
|
112
|
+
* thud [{'bar': 'baz'}]
|
|
113
|
+
```
|
|
115
114
|
|
|
116
115
|
Search with score:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
.. code-block::
|
|
116
|
+
```python
|
|
117
|
+
results = vector_store.similarity_search_with_score(query="qux", k=1)
|
|
118
|
+
for doc, score in results:
|
|
119
|
+
print(f"* [SIM={score:3f}] {doc.page_content} [{doc.metadata}]")
|
|
120
|
+
```
|
|
124
121
|
|
|
125
|
-
|
|
122
|
+
```txt
|
|
123
|
+
* [SIM=0.832268] foo [{'baz': 'bar'}]
|
|
124
|
+
```
|
|
126
125
|
|
|
127
126
|
Async:
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
# await vector_store.aadd_documents(documents=documents)
|
|
132
|
-
|
|
133
|
-
# delete documents
|
|
134
|
-
# await vector_store.adelete(ids=["3"])
|
|
127
|
+
```python
|
|
128
|
+
# add documents
|
|
129
|
+
# await vector_store.aadd_documents(documents=documents)
|
|
135
130
|
|
|
136
|
-
|
|
137
|
-
|
|
131
|
+
# delete documents
|
|
132
|
+
# await vector_store.adelete(ids=["3"])
|
|
138
133
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
for doc, score in results:
|
|
142
|
-
print(f"* [SIM={score:3f}] {doc.page_content} [{doc.metadata}]")
|
|
134
|
+
# search
|
|
135
|
+
# results = vector_store.asimilarity_search(query="thud", k=1)
|
|
143
136
|
|
|
144
|
-
|
|
137
|
+
# search with score
|
|
138
|
+
results = await vector_store.asimilarity_search_with_score(query="qux", k=1)
|
|
139
|
+
for doc, score in results:
|
|
140
|
+
print(f"* [SIM={score:3f}] {doc.page_content} [{doc.metadata}]")
|
|
141
|
+
```
|
|
145
142
|
|
|
146
|
-
|
|
143
|
+
```txt
|
|
144
|
+
* [SIM=0.832268] foo [{'baz': 'bar'}]
|
|
145
|
+
```
|
|
147
146
|
|
|
148
147
|
Use as Retriever:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
.. code-block::
|
|
158
|
-
|
|
159
|
-
[Document(id='2', metadata={'bar': 'baz'}, page_content='thud')]
|
|
148
|
+
```python
|
|
149
|
+
retriever = vector_store.as_retriever(
|
|
150
|
+
search_type="mmr",
|
|
151
|
+
search_kwargs={"k": 1, "fetch_k": 2, "lambda_mult": 0.5},
|
|
152
|
+
)
|
|
153
|
+
retriever.invoke("thud")
|
|
154
|
+
```
|
|
160
155
|
|
|
156
|
+
```txt
|
|
157
|
+
[Document(id='2', metadata={'bar': 'baz'}, page_content='thud')]
|
|
158
|
+
```
|
|
161
159
|
"""
|
|
162
160
|
|
|
163
161
|
def __init__(self, embedding: Embeddings) -> None:
|
|
@@ -524,7 +522,7 @@ class InMemoryVectorStore(VectorStore):
|
|
|
524
522
|
Args:
|
|
525
523
|
path: The path to load the vector store from.
|
|
526
524
|
embedding: The embedding to use.
|
|
527
|
-
kwargs: Additional arguments to pass to the constructor.
|
|
525
|
+
**kwargs: Additional arguments to pass to the constructor.
|
|
528
526
|
|
|
529
527
|
Returns:
|
|
530
528
|
A VectorStore object.
|
langchain_core/version.py
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langchain-core
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.0rc1
|
|
4
4
|
Summary: Building applications with LLMs through composability
|
|
5
|
-
Project-URL:
|
|
6
|
-
Project-URL:
|
|
7
|
-
Project-URL:
|
|
5
|
+
Project-URL: homepage, https://docs.langchain.com/
|
|
6
|
+
Project-URL: repository, https://github.com/langchain-ai/langchain/tree/master/libs/core
|
|
7
|
+
Project-URL: changelog, https://github.com/langchain-ai/langchain/releases?q=%22langchain-core%3D%3D1%22
|
|
8
|
+
Project-URL: twitter, https://x.com/LangChainAI
|
|
9
|
+
Project-URL: slack, https://www.langchain.com/join-community
|
|
10
|
+
Project-URL: reddit, https://www.reddit.com/r/LangChain/
|
|
8
11
|
License: MIT
|
|
9
12
|
Requires-Python: <4.0.0,>=3.10.0
|
|
10
13
|
Requires-Dist: jsonpatch<2.0.0,>=1.33.0
|
|
@@ -18,8 +21,15 @@ Description-Content-Type: text/markdown
|
|
|
18
21
|
|
|
19
22
|
# 🦜🍎️ LangChain Core
|
|
20
23
|
|
|
21
|
-
[](https://pypi.org/project/langchain-core/#history)
|
|
25
|
+
[](https://opensource.org/licenses/MIT)
|
|
22
26
|
[](https://pypistats.org/packages/langchain-core)
|
|
27
|
+
[](https://twitter.com/langchainai)
|
|
28
|
+
|
|
29
|
+
Looking for the JS/TS version? Check out [LangChain.js](https://github.com/langchain-ai/langchainjs).
|
|
30
|
+
|
|
31
|
+
To help you ship LangChain apps to production faster, check out [LangSmith](https://smith.langchain.com).
|
|
32
|
+
[LangSmith](https://smith.langchain.com) is a unified developer platform for building, testing, and monitoring LLM applications.
|
|
23
33
|
|
|
24
34
|
## Quick Install
|
|
25
35
|
|
|
@@ -27,16 +37,14 @@ Description-Content-Type: text/markdown
|
|
|
27
37
|
pip install langchain-core
|
|
28
38
|
```
|
|
29
39
|
|
|
30
|
-
## What is
|
|
40
|
+
## 🤔 What is this?
|
|
31
41
|
|
|
32
|
-
LangChain Core contains the base abstractions that power the
|
|
42
|
+
LangChain Core contains the base abstractions that power the LangChain ecosystem.
|
|
33
43
|
|
|
34
44
|
These abstractions are designed to be as modular and simple as possible.
|
|
35
45
|
|
|
36
46
|
The benefit of having these abstractions is that any provider can implement the required interface and then easily be used in the rest of the LangChain ecosystem.
|
|
37
47
|
|
|
38
|
-
For full documentation see the [API reference](https://reference.langchain.com/python/).
|
|
39
|
-
|
|
40
48
|
## ⛰️ Why build on top of LangChain Core?
|
|
41
49
|
|
|
42
50
|
The LangChain ecosystem is built on top of `langchain-core`. Some of the benefits:
|
|
@@ -45,12 +53,16 @@ The LangChain ecosystem is built on top of `langchain-core`. Some of the benefit
|
|
|
45
53
|
- **Stability**: We are committed to a stable versioning scheme, and will communicate any breaking changes with advance notice and version bumps.
|
|
46
54
|
- **Battle-tested**: Core components have the largest install base in the LLM ecosystem, and are used in production by many companies.
|
|
47
55
|
|
|
56
|
+
## 📖 Documentation
|
|
57
|
+
|
|
58
|
+
For full documentation, see the [API reference](https://reference.langchain.com/python/langchain_core/).
|
|
59
|
+
|
|
48
60
|
## 📕 Releases & Versioning
|
|
49
61
|
|
|
50
|
-
See our [Releases](https://docs.langchain.com/oss/python/release-policy) and [Versioning
|
|
62
|
+
See our [Releases](https://docs.langchain.com/oss/python/release-policy) and [Versioning](https://docs.langchain.com/oss/python/versioning) policies.
|
|
51
63
|
|
|
52
64
|
## 💁 Contributing
|
|
53
65
|
|
|
54
66
|
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
|
|
55
67
|
|
|
56
|
-
For detailed information on how to contribute, see the [Contributing Guide](https://docs.langchain.com/oss/python/contributing).
|
|
68
|
+
For detailed information on how to contribute, see the [Contributing Guide](https://docs.langchain.com/oss/python/contributing/overview).
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
langchain_core/__init__.py,sha256=5oThb0zpZmmoQFL0jqYB3GgBrXAJUSj5ZJ2GwVnR7IQ,711
|
|
2
|
+
langchain_core/_import_utils.py,sha256=PdYzgXd1wraCcECcMvJQpthmN3i__5h7mYVmFyLpq_s,1423
|
|
3
|
+
langchain_core/agents.py,sha256=juDMEx_zF6B2InlXZfQ-pp0y3AetXqOW-r5W5tx3peI,8450
|
|
4
|
+
langchain_core/caches.py,sha256=5SnTAZXc1gdiYrg_OydKY30HPZjwTrGsxXtt20xbZzM,9528
|
|
5
|
+
langchain_core/chat_history.py,sha256=jGHFCEiz3o6U-wphHyxDaXxPXGzs1zW4vHAf8TZjghU,8466
|
|
6
|
+
langchain_core/chat_loaders.py,sha256=b57Gl3KGPxq9gYJjetsHfJm1I6kSqi7bDE91fJJOR84,601
|
|
7
|
+
langchain_core/chat_sessions.py,sha256=YEO3ck5_wRGd3a2EnGD7M_wTvNC_4T1IVjQWekagwaM,564
|
|
8
|
+
langchain_core/env.py,sha256=RHExSWJ2bW-6Wxb6UyBGxU5flLoNYOAeslZ9iTjomQE,598
|
|
9
|
+
langchain_core/exceptions.py,sha256=jHHBgOA8KokIe0lbbclYoXtTEwrL62KHmT7TI76WoQI,3258
|
|
10
|
+
langchain_core/globals.py,sha256=jO27FstGK1cyzNT096GD9lFq2YgNxY1DZ6NtA_yKdR8,1852
|
|
11
|
+
langchain_core/prompt_values.py,sha256=BpmG6U7yvrn7QugyodB4LpaWAmSNgKJRkSLIu411eyQ,4106
|
|
12
|
+
langchain_core/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
+
langchain_core/rate_limiters.py,sha256=qFf00tx7gKcrh0xM3f7UmPoynuOaLfk8AVq7uYnlEGg,9533
|
|
14
|
+
langchain_core/retrievers.py,sha256=DR8g-JPt3xlhCSebLQShJ64VpMsIWd3-TpfLJO2daoo,11111
|
|
15
|
+
langchain_core/stores.py,sha256=AGZVNo_QATcTRiih24WZ76e1L8Sa861-7umGCbS95mw,9237
|
|
16
|
+
langchain_core/structured_query.py,sha256=mat7BKovKjckzMn3-I1El49yeGjg3cqk4ptpJHAPA-4,5123
|
|
17
|
+
langchain_core/sys_info.py,sha256=7BEle6I6WQIXNcNFGM6RxF9wNMVysjLpdlNACBC4CrA,3803
|
|
18
|
+
langchain_core/version.py,sha256=CnG-V_rgBQNeZ_GFGV-d_Uk8j0WzrW4MlTGF6jg6rcU,78
|
|
19
|
+
langchain_core/_api/__init__.py,sha256=PYm_j7qRRKh5ca0TTra5UF-nko3ieZZZ5EeAFAinm3o,1973
|
|
20
|
+
langchain_core/_api/beta_decorator.py,sha256=IJgG2_kRb2eBmvHfarDjanJY4k1jwoPJWSOHZ5SLB4U,8664
|
|
21
|
+
langchain_core/_api/deprecation.py,sha256=nReAhxZ1dBwLhHdGAaqqRpf7aLQJ1dw4UtqmrRqeNLE,20296
|
|
22
|
+
langchain_core/_api/internal.py,sha256=aOZkYANu747LyWzyAk-0KE4RjdTYj18Wtlh7F9_qyPM,683
|
|
23
|
+
langchain_core/_api/path.py,sha256=y3dAvsG4JS0BuWErpJ5KhxCykJX2i03kYdeDU-Iup3Y,1349
|
|
24
|
+
langchain_core/callbacks/__init__.py,sha256=8FK0gmkWnbDYWrShBQowg0OK06Hprdim3sxiOla80xk,4225
|
|
25
|
+
langchain_core/callbacks/base.py,sha256=WeUgQGlMInpmr5RUgaWbKmsI3ni7thnuuy_C2eooJV4,34208
|
|
26
|
+
langchain_core/callbacks/file.py,sha256=ayGb4d07Gi5nR4RtFHu1l94NzOISd0jhZ6QNMdzJK1M,8368
|
|
27
|
+
langchain_core/callbacks/manager.py,sha256=89wK92YUvw5FwvY30kF4UCFlxR2kYFgVAnPb5ZNj2nY,84719
|
|
28
|
+
langchain_core/callbacks/stdout.py,sha256=A9Myp1BTwjhiTuBXPyhDdUnT_lLvSlIam3tmVUbWUoU,3711
|
|
29
|
+
langchain_core/callbacks/streaming_stdout.py,sha256=ylgpp4Bhs5Gv1aNeZWuuC2FU7C3IO7Q9CpEDxCgdFXY,4310
|
|
30
|
+
langchain_core/callbacks/usage.py,sha256=qQHyUeWL-NLwpb9jUTvjLhm0yRJ0Ay5j_hRAsQrCxkk,5051
|
|
31
|
+
langchain_core/document_loaders/__init__.py,sha256=DkZPp9cEVmsnz9SM1xtuefH_fGQFvA2WtpRG6iePPBs,975
|
|
32
|
+
langchain_core/document_loaders/base.py,sha256=PH2NWqTg2-Qz8_Yd5TtX3jkSAqaVChTAMXEqOZM-cTs,4653
|
|
33
|
+
langchain_core/document_loaders/blob_loaders.py,sha256=4m1k8boiwXw3z4yMYT8bnYUA-eGTPtEZyUxZvI3GbTs,1077
|
|
34
|
+
langchain_core/document_loaders/langsmith.py,sha256=mPdi7GqXVMump1-oYuJ1RP6I3IHARHAtKr5SnZZMCZY,5335
|
|
35
|
+
langchain_core/documents/__init__.py,sha256=w8LkIJ6Y25-cg1FQjve2ZCO7O_hg3ZidMPXp6ijIHTU,849
|
|
36
|
+
langchain_core/documents/base.py,sha256=aDHhHlaJS0BR9v1iqyTpv5UViPH-6WcW97uNrw-Z8b4,10426
|
|
37
|
+
langchain_core/documents/compressor.py,sha256=umDoE70e7Cn32muNKRPXwC5cjML1gEg5XLmRd1DQQqg,1984
|
|
38
|
+
langchain_core/documents/transformers.py,sha256=qIq-zmC9WcW9Ec1Gb_X1tL2o98MqhlVb4V6nLU4siBs,2489
|
|
39
|
+
langchain_core/embeddings/__init__.py,sha256=0SfcdkVSSXmTFXznUyeZq_b1ajpwIGDueGAAfwyMpUY,774
|
|
40
|
+
langchain_core/embeddings/embeddings.py,sha256=u50T2VxLLyfGBCKcVtWfSiZrtKua8sOSHwSSHRKtcno,2405
|
|
41
|
+
langchain_core/embeddings/fake.py,sha256=m5e2WObDk0fOYQO7atbdIq6i2DtzugwtPYFZBYQFXOg,3824
|
|
42
|
+
langchain_core/example_selectors/__init__.py,sha256=k8y0chtEhaHf8Y1_nZVDsb9CWDdRIWFb9U806mnbGvo,1394
|
|
43
|
+
langchain_core/example_selectors/base.py,sha256=4wRCERHak6Ci5JEKHeidQ_pbBgzQyc-vnQsz2sqBFzA,1716
|
|
44
|
+
langchain_core/example_selectors/length_based.py,sha256=THlN8aPzR59tfwNgGwrC6EtgR4bsOSqh1uK_oycIfpU,3384
|
|
45
|
+
langchain_core/example_selectors/semantic_similarity.py,sha256=kuPlGs0o63mZX2yKno6YRuT2m8Vdnyy7EZpyA1jx0QA,13667
|
|
46
|
+
langchain_core/indexing/__init__.py,sha256=VOvbbBJYY_UZdMKAeJCdQdszMiAOhAo3Cbht1HEkk8g,1274
|
|
47
|
+
langchain_core/indexing/api.py,sha256=zSlsOfJJwUEMmQcHLqjgiH9oJAf2hbTrRcCJp4GWjeg,38501
|
|
48
|
+
langchain_core/indexing/base.py,sha256=1UHqx9ppZM2by-UlXn-ywzEDLKNLPrWSpaKiDpf_df8,22464
|
|
49
|
+
langchain_core/indexing/in_memory.py,sha256=2AbNLZPCIXfSsVwSxEMhqhVbEUcprUVgshnIoRoME5g,3332
|
|
50
|
+
langchain_core/language_models/__init__.py,sha256=Tnw50O6WzajipFAFy94PRqeSkIKiF3RP-polBQ_gtgM,3899
|
|
51
|
+
langchain_core/language_models/_utils.py,sha256=x-_TJAweHpPs4mPeSl1WUYcQLl_zjYRbGqdyb_qVdSI,11020
|
|
52
|
+
langchain_core/language_models/base.py,sha256=n0YcMIcTHe8dad0Pp8Hx2tYhwuEhbr-pkTpEoJ7Uehc,10711
|
|
53
|
+
langchain_core/language_models/chat_models.py,sha256=657u7D5EdMKyIwnN5syHQ4si0rJGOd3Gd30lx8tl6WU,70977
|
|
54
|
+
langchain_core/language_models/fake.py,sha256=hb2yU3snYPTueZiJ-0KI0MKHYBNm6zdUw7xe8WqguEY,3732
|
|
55
|
+
langchain_core/language_models/fake_chat_models.py,sha256=e94BCY2J37rGNx-DGG-NbUNBjIdQ65zfv0Tl6_yygGQ,13507
|
|
56
|
+
langchain_core/language_models/llms.py,sha256=YcdJ6VgS7EKc0OWSjONUi0EaX4XM66tYrFmdYgROGZw,53886
|
|
57
|
+
langchain_core/load/__init__.py,sha256=m3_6Fk2gpYZO0xqyTnZzdQigvsYHjMariLq_L2KwJFk,1150
|
|
58
|
+
langchain_core/load/dump.py,sha256=BPNj1aLXrcMS2XxSh6G94zFHbq54Py2h1YLIfoYl0uE,2655
|
|
59
|
+
langchain_core/load/load.py,sha256=s1SNuK6AQ2gf5o1bc1cbkWyiegiXvwd1eJ1xWnXIgh0,9489
|
|
60
|
+
langchain_core/load/mapping.py,sha256=SqBaAWAM2aV_Wgy80DAlS-39tJkHLcCyM45bVVnN12w,29513
|
|
61
|
+
langchain_core/load/serializable.py,sha256=ehTLpU8QZUkDoDzts6MXtmS0pLitwRAYRV1LI4oEg0U,11678
|
|
62
|
+
langchain_core/messages/__init__.py,sha256=4npkXfwypol9UrDbQXN8kdNKEcimj7NRL628XCVTad4,5483
|
|
63
|
+
langchain_core/messages/ai.py,sha256=8wYQZQXQ3UZsSnopI4IzvfhWOa4Rc9epRddknhdnKOQ,27035
|
|
64
|
+
langchain_core/messages/base.py,sha256=5ZTwpb-EQ_ijrLrggAbnm4Fmf2uOX9FjQ5kQEXDodDE,16302
|
|
65
|
+
langchain_core/messages/chat.py,sha256=kFsyuKaefvFPKb1hxy8LuK4azfUqpi0SBm0qVFujQNo,2269
|
|
66
|
+
langchain_core/messages/content.py,sha256=SHD9yq4V7aqcNLHJhZn-NyBHgL5-rHC1uXHDI1FDDxA,41462
|
|
67
|
+
langchain_core/messages/function.py,sha256=anA0lnNNTgHwYhkmiqpJ6DHZEX7ZxxZBt78TOxYK7h4,2177
|
|
68
|
+
langchain_core/messages/human.py,sha256=xpZjXWRXp9CtOUYNckF-tzdm8q-GQ3OCQj1MA4bw2_s,2201
|
|
69
|
+
langchain_core/messages/modifier.py,sha256=fL60lLamA2r9SSPmDqmOj1REubXnEgoE1wSUdc9Mmro,897
|
|
70
|
+
langchain_core/messages/system.py,sha256=kEfqzRSGzs5AgDcM74EHuQubmVvbfY3jCdOzGkkh9QI,2222
|
|
71
|
+
langchain_core/messages/tool.py,sha256=02BivvpdbbFJQFU_WrrXh14gSZYfzZxGQVJaVYOUshY,12856
|
|
72
|
+
langchain_core/messages/utils.py,sha256=uwgMfy3U56oPmR_09LBjSAl_u_Y3TIu_BERgYXQ8kRY,69175
|
|
73
|
+
langchain_core/messages/block_translators/__init__.py,sha256=uBbrOXzrntee1-m1Gr6-nBgPG7vRvkXranLdi3jfjOs,4245
|
|
74
|
+
langchain_core/messages/block_translators/anthropic.py,sha256=3HkBqXJL8brEQ3ir6Z7sB0w8bnbN4NmUbE8Yvm_AgeQ,19132
|
|
75
|
+
langchain_core/messages/block_translators/bedrock.py,sha256=yLjYwtCsYGHBEj9CSXHCZYLmwsA4F6D6NTT5kE11Bww,3511
|
|
76
|
+
langchain_core/messages/block_translators/bedrock_converse.py,sha256=S-uKXFhU-7jj_zmAtO-vL0wx6Kq2dxCZf4YudNIAxT4,11995
|
|
77
|
+
langchain_core/messages/block_translators/google_genai.py,sha256=BT1emuR7B_IcQ8HngzTmffUl7eWVX1F91AzMxsNONZ0,22075
|
|
78
|
+
langchain_core/messages/block_translators/google_vertexai.py,sha256=spEuRU1tFsmQvIlHdrQgDswDP5XSQr0-5qgW8x47vXQ,1628
|
|
79
|
+
langchain_core/messages/block_translators/groq.py,sha256=s7xCVITYV2W3CqZpc3OO7hXQRICLqNi8hyPofT2OvqM,5444
|
|
80
|
+
langchain_core/messages/block_translators/langchain_v0.py,sha256=uNPyWgfJxaVzeSdBgxDhB6U7qJYpyMX4fuRH6tr-H7o,11659
|
|
81
|
+
langchain_core/messages/block_translators/openai.py,sha256=acTdGLrCxDhkYy2IOKuAD34aYQ8w1yiiS-DiUm7mstE,39262
|
|
82
|
+
langchain_core/output_parsers/__init__.py,sha256=2S_EWMfq9WPSRQfelmsV6UifZEaQR6SPGr-sFP_MT9k,2629
|
|
83
|
+
langchain_core/output_parsers/base.py,sha256=0qdwi_l3Ha2Ls9yRhEMHUGNxNvu0s9qFH0lhSeDBVWo,11071
|
|
84
|
+
langchain_core/output_parsers/format_instructions.py,sha256=8oUbeysnVGvXWyNd5gqXlEL850D31gMTy74GflsuvRU,553
|
|
85
|
+
langchain_core/output_parsers/json.py,sha256=EEmd4wKHyJ6zPIhJ5P4Mm1il51gdqH2-QUPlr2oGDMs,4566
|
|
86
|
+
langchain_core/output_parsers/list.py,sha256=nhrWreDkDvjuv0SYUmm8wJDC_fRYdw4AT31BdFLZ0KE,7259
|
|
87
|
+
langchain_core/output_parsers/openai_functions.py,sha256=Fc-XUtylqdpSbYIvM4bwsB4-eyfOPJw_YAfKQTExkSM,10601
|
|
88
|
+
langchain_core/output_parsers/openai_tools.py,sha256=tMo7Q1mmXdBuzhWTkmDdYJfYk1eZmNj6BLegC5xKOt4,12604
|
|
89
|
+
langchain_core/output_parsers/pydantic.py,sha256=oi9qRawZbyW2U_Kg7QSE26TBSjfApz5UQeI6odEwNsI,4446
|
|
90
|
+
langchain_core/output_parsers/string.py,sha256=irM6yUIMfnDv3RSzPXB6y7M7J3G6iHsz5GW_L0rt4a0,963
|
|
91
|
+
langchain_core/output_parsers/transform.py,sha256=FyYvkS1KnAHX9afF1qqdJbUBa_xUyDTvspPQBq8G5uM,5835
|
|
92
|
+
langchain_core/output_parsers/xml.py,sha256=65MwScRiyULkK3rfuqJespGHpl5XRIMNREUNofAzLnQ,10897
|
|
93
|
+
langchain_core/outputs/__init__.py,sha256=CLL4IYb-N18gSXLscJVNWDL2LapGieXJF5EhG8uQSvE,2115
|
|
94
|
+
langchain_core/outputs/chat_generation.py,sha256=sD-wCAFWuzADKM7swf9EEaNJmRsEAfZT6tLi00UfPDY,4733
|
|
95
|
+
langchain_core/outputs/chat_result.py,sha256=ZXLGUtb5xqJdoCtAX1XeiJf20ELx6gui7DUHH0rKnv8,1324
|
|
96
|
+
langchain_core/outputs/generation.py,sha256=3SmQ2QylYr7uwfQ2xdC1QK4ixE_MhRDMUgzvZLDcT3k,2621
|
|
97
|
+
langchain_core/outputs/llm_result.py,sha256=srdoHk-Vk2Xh40XMYAgfsFwGFmvyk2NOkUkvb6U_xZ8,3894
|
|
98
|
+
langchain_core/outputs/run_info.py,sha256=xCMWdsHfgnnodaf4OCMvZaWUfS836X7mV15JPkqvZjo,594
|
|
99
|
+
langchain_core/prompts/__init__.py,sha256=gXRJkxl6z7AYTGyyQAF0DQYpbwCUvfCFwXFfhSekzDw,3033
|
|
100
|
+
langchain_core/prompts/base.py,sha256=-aVjQhOlC4HXq9Av-PvvV1PURsT6I2V-u2yLQ-Bp63s,15747
|
|
101
|
+
langchain_core/prompts/chat.py,sha256=pnDpta0LcOF3yfhrAEVtCVu2RbVyU4fuciuTDuQQ0Fc,50332
|
|
102
|
+
langchain_core/prompts/dict.py,sha256=te2WCUO4PlzedgJ_k3akbjLN41t0kbsBGeHnNkjfbS0,4719
|
|
103
|
+
langchain_core/prompts/few_shot.py,sha256=FaVMuen4eG0B-lnSr2-jGC_JMOhYoK1tfG-pJgYfcmg,15794
|
|
104
|
+
langchain_core/prompts/few_shot_with_templates.py,sha256=5LpQXbXw6hzk4E9dg6R53oSNClBsGqlRE1XtfBNwwtQ,7804
|
|
105
|
+
langchain_core/prompts/image.py,sha256=6L6KJWsw0cKBAWlDR7haQuSzYuU5wBag3zycFUPu7j8,4780
|
|
106
|
+
langchain_core/prompts/loading.py,sha256=hvNsDvqLz5wJA1EywW2wCwKUhJgUzNcIKfp5VEVOEGc,6889
|
|
107
|
+
langchain_core/prompts/message.py,sha256=G1YjpAhQ8S4n7S1iqZ7PsdubfHb6cBlwZbnR4QXSLyk,2624
|
|
108
|
+
langchain_core/prompts/prompt.py,sha256=CCt9jA446jQV7GEVomYCv1TMhtHsJSSxFVLsmwuk2AE,11099
|
|
109
|
+
langchain_core/prompts/string.py,sha256=ISSLb9AjhopbfROmAE1IiTonhAdabpbuDp3T2KhGOTs,10854
|
|
110
|
+
langchain_core/prompts/structured.py,sha256=9djXFKGSDpBPSV7d_FacFwrFSiI_IJS8baySKgw3bD4,5728
|
|
111
|
+
langchain_core/runnables/__init__.py,sha256=efTnFjwN_QSAv5ThLmKuWeu8P1BLARH-cWKZBuimfDM,3858
|
|
112
|
+
langchain_core/runnables/base.py,sha256=vQQQPzui5f4XNAlRrAHSAa_cxaktT84Q414UYxdKzuI,216197
|
|
113
|
+
langchain_core/runnables/branch.py,sha256=5NDUl8aGD_ZWexjUB-ZMxCzwIzspsdSANYvLAW2PkUA,15668
|
|
114
|
+
langchain_core/runnables/config.py,sha256=10DvOzCSEWbUnw5H9N3rC-Ec0gcjGu-G1mtLZaBrjJU,19202
|
|
115
|
+
langchain_core/runnables/configurable.py,sha256=faThZrKuHl4XG1FtJ8ExhAY21VLGWNN8-xaqI5RJZLQ,23997
|
|
116
|
+
langchain_core/runnables/fallbacks.py,sha256=K8nTmZgbI5J-nZUsN0kOenTC79tHVfo4WtVY5F3FoiI,24430
|
|
117
|
+
langchain_core/runnables/graph.py,sha256=UzzHSBQ_MQg-oI_2hFgDcdcKV1QQb_jPqDNqh5MqLxk,23482
|
|
118
|
+
langchain_core/runnables/graph_ascii.py,sha256=le9njNqnDYtu1znTWGIyZYstEaiYuxBk9Qx8r7yfoXc,10328
|
|
119
|
+
langchain_core/runnables/graph_mermaid.py,sha256=G9plwiEIdiTNw3VxAJLMA8Zu8OaViln8RjyKpKU9VBA,16846
|
|
120
|
+
langchain_core/runnables/graph_png.py,sha256=72LW6XhnkHa_No_NEIXjEOcyHrSToRlEV82OKASB6lI,5475
|
|
121
|
+
langchain_core/runnables/history.py,sha256=gKJWTeuqKh68qtE6J6ttS3qaU08u1zRGxczGvOrW3T0,24215
|
|
122
|
+
langchain_core/runnables/passthrough.py,sha256=cxmTzsMrlUVMQR6yzTrhj4S8VYTDAekl-qZbE86_OPg,25700
|
|
123
|
+
langchain_core/runnables/retry.py,sha256=qFdTOi2ZSkdtm7IL1SLTpneGV60tsT6hMZCBuoPzIo8,13680
|
|
124
|
+
langchain_core/runnables/router.py,sha256=GpYMLptt7FD7zEm2F4GGHkEHj6xaS0im6g8nDU8g9Vo,7114
|
|
125
|
+
langchain_core/runnables/schema.py,sha256=49VLpvWw4Yi0_HKku37glyuoifvfHwtsC_v7bMfjZIA,5764
|
|
126
|
+
langchain_core/runnables/utils.py,sha256=3ktH0kraQKgbl4AjIZ5k9-CTSsDIuxm3t7kt5-xk0zc,22324
|
|
127
|
+
langchain_core/tools/__init__.py,sha256=qe2E9VwZ7hpdkToz96oSJ080a0de9oQwSO9FP1XnmM0,2518
|
|
128
|
+
langchain_core/tools/base.py,sha256=YyElgybj9aq7Nz9TY3Gs0zEbYEjb4jVsdIkJXINkUkg,48170
|
|
129
|
+
langchain_core/tools/convert.py,sha256=V11-bbfqqktekz6cTV5yAFSZOVyX9j6gCrF1rV1JzTc,15851
|
|
130
|
+
langchain_core/tools/render.py,sha256=gD3pXYWjCaDKsYq_MZ-yCRXl1wUJbOh6dJobda9VjYM,1817
|
|
131
|
+
langchain_core/tools/retriever.py,sha256=PZLBj65xsg-c_f4X2eCQ0x2mLmgFL6qsJL6rUKs5mzs,3823
|
|
132
|
+
langchain_core/tools/simple.py,sha256=X45COzZqAm4Lmgy89DtOCF3sMk1KrIE36gQ4D0WT0-0,6644
|
|
133
|
+
langchain_core/tools/structured.py,sha256=dwZWcR9SVd13-OzYkUSQfJIBu0o56MKBLVJsxl_17BI,9362
|
|
134
|
+
langchain_core/tracers/__init__.py,sha256=Yf0CQ-IcBa8f9lu0wMA_looT6Q8we3C0yd-xMP3c0Sc,1362
|
|
135
|
+
langchain_core/tracers/_streaming.py,sha256=U9pWQDJNUDH4oOYF3zvUMUtgkCecJzXQvfo-wYARmhQ,982
|
|
136
|
+
langchain_core/tracers/base.py,sha256=cywwNDlynmidmhOCQ8A1J0qhnvN_orWNB8z2UjvCEGs,25454
|
|
137
|
+
langchain_core/tracers/context.py,sha256=-7pbOA3QR0OIeehpD9eMpqugGgwLc_XxMjVQRg8GAJI,6194
|
|
138
|
+
langchain_core/tracers/core.py,sha256=doyEB6enQVeGYFbC5EmC_gVGq6tcZQpYXm4bXVaI11c,23306
|
|
139
|
+
langchain_core/tracers/evaluation.py,sha256=XmoPqBNFg6H-9K46fWanABAEVUgbob9S7qU-DPcL4RM,8367
|
|
140
|
+
langchain_core/tracers/event_stream.py,sha256=Ri-uK6DSx6O4axTN3jzVvSHjGxkgfvu5YZ3TQjbBwfs,34876
|
|
141
|
+
langchain_core/tracers/langchain.py,sha256=juy0i7aryBuqWuML9EiNrAI6SAv2qllt5hAE6mC_0HQ,10477
|
|
142
|
+
langchain_core/tracers/log_stream.py,sha256=EhC7ExdGb9FRZRzRJdQ1IeFd2TJB95_QxTzT72mABcg,25335
|
|
143
|
+
langchain_core/tracers/memory_stream.py,sha256=iIPBONnh80I0tHUfsqXP0z-K2sOV1pLzsjTcLxohiS0,5003
|
|
144
|
+
langchain_core/tracers/root_listeners.py,sha256=Bq87z48uywS-I2zHz-p82D1s-5-0SZb5GnFPSD4gEh8,4133
|
|
145
|
+
langchain_core/tracers/run_collector.py,sha256=Uy8lwFLDgMtLmzIi9RlBY-xXs9NRQoNSNekluuZzqxI,1265
|
|
146
|
+
langchain_core/tracers/schemas.py,sha256=-B159J_A1pLdmN6GLR3yM2S_KozJWawKaFc7vI2xXaU,191
|
|
147
|
+
langchain_core/tracers/stdout.py,sha256=puB57vImIV6z8tmYvMcRjRbw0URH9G3v-jE4aZSseXI,6759
|
|
148
|
+
langchain_core/utils/__init__.py,sha256=-JVVUPlxBr_6vwAQpsBJweBJsH0kKYw4F_c3qQTICzA,3045
|
|
149
|
+
langchain_core/utils/_merge.py,sha256=9wTZdkuG45azGBze7OZFFIoCiidHi3roe6TQiQ5bcV0,7536
|
|
150
|
+
langchain_core/utils/aiter.py,sha256=Bo10JfX51k7_V9oNTC2LCni2IBs6A_Wlo0_QaHKOg54,10589
|
|
151
|
+
langchain_core/utils/env.py,sha256=pQTqZLCjcueoxTd8epc3cr0lRn8njJf_A-bOQfHWPXw,2458
|
|
152
|
+
langchain_core/utils/formatting.py,sha256=fkieArzKXxSsLcEa3B-MX60O4ZLeeLjiPtVtxCJPcOU,1480
|
|
153
|
+
langchain_core/utils/function_calling.py,sha256=8fOEN349WffEPuILDnHgQnIRRWUCXCjkzdVJo0x8QTQ,27722
|
|
154
|
+
langchain_core/utils/html.py,sha256=ReIdqTTC8r-AfsqynFjCIaFC9t9sI_vYnmz3DanpVqQ,3714
|
|
155
|
+
langchain_core/utils/image.py,sha256=1MH8Lbg0f2HfhTC4zobKMvpVoHRfpsyvWHq9ae4xENo,532
|
|
156
|
+
langchain_core/utils/input.py,sha256=qevDS1JDn8o5R49Ae20edEvpnwU-qyXCDPRzPGa1FrA,1903
|
|
157
|
+
langchain_core/utils/interactive_env.py,sha256=LBgNICNAwgwDMOdlVD12TtZfSboPOKXaBS2Jn-bsXQ8,289
|
|
158
|
+
langchain_core/utils/iter.py,sha256=4wuN30A7Aayy9RdikO5fcTzNXBd_xvKEJtzqj_MXiF0,7315
|
|
159
|
+
langchain_core/utils/json.py,sha256=u7HomLS9ThoT9wB-S8bLL6iq1lc2ZRUr0Fy8hi47DGA,6554
|
|
160
|
+
langchain_core/utils/json_schema.py,sha256=_hgV2Gzs1FkkFqLwqIPZcmN4DFyqm6PICYIM8Bjkqm4,9068
|
|
161
|
+
langchain_core/utils/mustache.py,sha256=2LgatBIOa1bGU4EaL5xrS076NWqfQkB4Mtencmc3mtQ,21262
|
|
162
|
+
langchain_core/utils/pydantic.py,sha256=Lu5Hu7tbMJpAEn4JHqPX2DstI3QMvnH4jRbjq3K283s,18510
|
|
163
|
+
langchain_core/utils/strings.py,sha256=v4S2dIFuryd8Na-4orRJNf7VlVCqo0x7tR9DmewnkzA,1784
|
|
164
|
+
langchain_core/utils/usage.py,sha256=vB674Eu69xDGx6JBJlySp6cnePkxCD0Wz26mi502NAM,1211
|
|
165
|
+
langchain_core/utils/utils.py,sha256=Kfpl83xT1j64RUODMZ0FtG68OzRm6lvNqAs9_TNkoTk,15756
|
|
166
|
+
langchain_core/vectorstores/__init__.py,sha256=5P0eoeoH5LHab64JjmEeWa6SxX4eMy-etAP1MEHsETY,804
|
|
167
|
+
langchain_core/vectorstores/base.py,sha256=bIuGEuH_kzYq9r5QMNCuHa-FRWRqahon8uKH2aOKqnU,40988
|
|
168
|
+
langchain_core/vectorstores/in_memory.py,sha256=tYjAn4bARPvdlNv5jxnZwOEA7iySHmZcxatHnoz1x44,15715
|
|
169
|
+
langchain_core/vectorstores/utils.py,sha256=w7JOtmyVLQU9RCxDSdQCyipCDBtEIvXZxH5RyrAcda4,4959
|
|
170
|
+
langchain_core-1.0.0rc1.dist-info/METADATA,sha256=wUoVtPTOD4d5Xvh5X87-bXL1yPOZxfzMyZHcF_XV0KQ,3402
|
|
171
|
+
langchain_core-1.0.0rc1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
172
|
+
langchain_core-1.0.0rc1.dist-info/RECORD,,
|
langchain_core/memory.py
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
"""**Memory** maintains Chain state, incorporating context from past runs.
|
|
2
|
-
|
|
3
|
-
This module contains memory abstractions from LangChain v0.0.x.
|
|
4
|
-
|
|
5
|
-
These abstractions are now deprecated and will be removed in LangChain v1.0.0.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
from __future__ import annotations
|
|
9
|
-
|
|
10
|
-
from abc import ABC, abstractmethod
|
|
11
|
-
from typing import Any
|
|
12
|
-
|
|
13
|
-
from pydantic import ConfigDict
|
|
14
|
-
|
|
15
|
-
from langchain_core._api import deprecated
|
|
16
|
-
from langchain_core.load.serializable import Serializable
|
|
17
|
-
from langchain_core.runnables import run_in_executor
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
@deprecated(
|
|
21
|
-
since="0.3.3",
|
|
22
|
-
removal="1.0.0",
|
|
23
|
-
message=(
|
|
24
|
-
"Please see the migration guide at: "
|
|
25
|
-
"https://python.langchain.com/docs/versions/migrating_memory/"
|
|
26
|
-
),
|
|
27
|
-
)
|
|
28
|
-
class BaseMemory(Serializable, ABC):
|
|
29
|
-
"""Abstract base class for memory in Chains.
|
|
30
|
-
|
|
31
|
-
Memory refers to state in Chains. Memory can be used to store information about
|
|
32
|
-
past executions of a Chain and inject that information into the inputs of
|
|
33
|
-
future executions of the Chain. For example, for conversational Chains Memory
|
|
34
|
-
can be used to store conversations and automatically add them to future model
|
|
35
|
-
prompts so that the model has the necessary context to respond coherently to
|
|
36
|
-
the latest input.
|
|
37
|
-
|
|
38
|
-
Example:
|
|
39
|
-
.. code-block:: python
|
|
40
|
-
|
|
41
|
-
class SimpleMemory(BaseMemory):
|
|
42
|
-
memories: dict[str, Any] = dict()
|
|
43
|
-
|
|
44
|
-
@property
|
|
45
|
-
def memory_variables(self) -> list[str]:
|
|
46
|
-
return list(self.memories.keys())
|
|
47
|
-
|
|
48
|
-
def load_memory_variables(
|
|
49
|
-
self, inputs: dict[str, Any]
|
|
50
|
-
) -> dict[str, str]:
|
|
51
|
-
return self.memories
|
|
52
|
-
|
|
53
|
-
def save_context(
|
|
54
|
-
self, inputs: dict[str, Any], outputs: dict[str, str]
|
|
55
|
-
) -> None:
|
|
56
|
-
pass
|
|
57
|
-
|
|
58
|
-
def clear(self) -> None:
|
|
59
|
-
pass
|
|
60
|
-
|
|
61
|
-
"""
|
|
62
|
-
|
|
63
|
-
model_config = ConfigDict(
|
|
64
|
-
arbitrary_types_allowed=True,
|
|
65
|
-
)
|
|
66
|
-
|
|
67
|
-
@property
|
|
68
|
-
@abstractmethod
|
|
69
|
-
def memory_variables(self) -> list[str]:
|
|
70
|
-
"""The string keys this memory class will add to chain inputs."""
|
|
71
|
-
|
|
72
|
-
@abstractmethod
|
|
73
|
-
def load_memory_variables(self, inputs: dict[str, Any]) -> dict[str, Any]:
|
|
74
|
-
"""Return key-value pairs given the text input to the chain.
|
|
75
|
-
|
|
76
|
-
Args:
|
|
77
|
-
inputs: The inputs to the chain.
|
|
78
|
-
|
|
79
|
-
Returns:
|
|
80
|
-
A dictionary of key-value pairs.
|
|
81
|
-
"""
|
|
82
|
-
|
|
83
|
-
async def aload_memory_variables(self, inputs: dict[str, Any]) -> dict[str, Any]:
|
|
84
|
-
"""Async return key-value pairs given the text input to the chain.
|
|
85
|
-
|
|
86
|
-
Args:
|
|
87
|
-
inputs: The inputs to the chain.
|
|
88
|
-
|
|
89
|
-
Returns:
|
|
90
|
-
A dictionary of key-value pairs.
|
|
91
|
-
"""
|
|
92
|
-
return await run_in_executor(None, self.load_memory_variables, inputs)
|
|
93
|
-
|
|
94
|
-
@abstractmethod
|
|
95
|
-
def save_context(self, inputs: dict[str, Any], outputs: dict[str, str]) -> None:
|
|
96
|
-
"""Save the context of this chain run to memory.
|
|
97
|
-
|
|
98
|
-
Args:
|
|
99
|
-
inputs: The inputs to the chain.
|
|
100
|
-
outputs: The outputs of the chain.
|
|
101
|
-
"""
|
|
102
|
-
|
|
103
|
-
async def asave_context(
|
|
104
|
-
self, inputs: dict[str, Any], outputs: dict[str, str]
|
|
105
|
-
) -> None:
|
|
106
|
-
"""Async save the context of this chain run to memory.
|
|
107
|
-
|
|
108
|
-
Args:
|
|
109
|
-
inputs: The inputs to the chain.
|
|
110
|
-
outputs: The outputs of the chain.
|
|
111
|
-
"""
|
|
112
|
-
await run_in_executor(None, self.save_context, inputs, outputs)
|
|
113
|
-
|
|
114
|
-
@abstractmethod
|
|
115
|
-
def clear(self) -> None:
|
|
116
|
-
"""Clear memory contents."""
|
|
117
|
-
|
|
118
|
-
async def aclear(self) -> None:
|
|
119
|
-
"""Async clear memory contents."""
|
|
120
|
-
await run_in_executor(None, self.clear)
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"""Pydantic v1 compatibility shim."""
|
|
2
|
-
|
|
3
|
-
from importlib import metadata
|
|
4
|
-
|
|
5
|
-
from pydantic.v1 import * # noqa: F403
|
|
6
|
-
|
|
7
|
-
from langchain_core._api.deprecation import warn_deprecated
|
|
8
|
-
|
|
9
|
-
try:
|
|
10
|
-
_PYDANTIC_MAJOR_VERSION: int = int(metadata.version("pydantic").split(".")[0])
|
|
11
|
-
except metadata.PackageNotFoundError:
|
|
12
|
-
_PYDANTIC_MAJOR_VERSION = 0
|
|
13
|
-
|
|
14
|
-
warn_deprecated(
|
|
15
|
-
"0.3.0",
|
|
16
|
-
removal="1.0.0",
|
|
17
|
-
alternative="pydantic.v1 or pydantic",
|
|
18
|
-
message=(
|
|
19
|
-
"As of langchain-core 0.3.0, LangChain uses pydantic v2 internally. "
|
|
20
|
-
"The langchain_core.pydantic_v1 module was a "
|
|
21
|
-
"compatibility shim for pydantic v1, and should no longer be used. "
|
|
22
|
-
"Please update the code to import from Pydantic directly.\n\n"
|
|
23
|
-
"For example, replace imports like: "
|
|
24
|
-
"`from langchain_core.pydantic_v1 import BaseModel`\n"
|
|
25
|
-
"with: `from pydantic import BaseModel`\n"
|
|
26
|
-
"or the v1 compatibility namespace if you are working in a code base "
|
|
27
|
-
"that has not been fully upgraded to pydantic 2 yet. "
|
|
28
|
-
"\tfrom pydantic.v1 import BaseModel\n"
|
|
29
|
-
),
|
|
30
|
-
)
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"""Pydantic v1 compatibility shim."""
|
|
2
|
-
|
|
3
|
-
from pydantic.v1.dataclasses import * # noqa: F403
|
|
4
|
-
|
|
5
|
-
from langchain_core._api import warn_deprecated
|
|
6
|
-
|
|
7
|
-
warn_deprecated(
|
|
8
|
-
"0.3.0",
|
|
9
|
-
removal="1.0.0",
|
|
10
|
-
alternative="pydantic.v1 or pydantic",
|
|
11
|
-
message=(
|
|
12
|
-
"As of langchain-core 0.3.0, LangChain uses pydantic v2 internally. "
|
|
13
|
-
"The langchain_core.pydantic_v1 module was a "
|
|
14
|
-
"compatibility shim for pydantic v1, and should no longer be used. "
|
|
15
|
-
"Please update the code to import from Pydantic directly.\n\n"
|
|
16
|
-
"For example, replace imports like: "
|
|
17
|
-
"`from langchain_core.pydantic_v1 import BaseModel`\n"
|
|
18
|
-
"with: `from pydantic import BaseModel`\n"
|
|
19
|
-
"or the v1 compatibility namespace if you are working in a code base "
|
|
20
|
-
"that has not been fully upgraded to pydantic 2 yet. "
|
|
21
|
-
"\tfrom pydantic.v1 import BaseModel\n"
|
|
22
|
-
),
|
|
23
|
-
)
|