langchain-core 0.3.75__py3-none-any.whl → 0.3.77__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.

Files changed (119) hide show
  1. langchain_core/_api/beta_decorator.py +22 -44
  2. langchain_core/_api/deprecation.py +30 -17
  3. langchain_core/_api/path.py +19 -2
  4. langchain_core/_import_utils.py +7 -0
  5. langchain_core/agents.py +10 -6
  6. langchain_core/beta/runnables/context.py +1 -2
  7. langchain_core/callbacks/base.py +28 -15
  8. langchain_core/callbacks/manager.py +83 -71
  9. langchain_core/callbacks/usage.py +6 -4
  10. langchain_core/chat_history.py +29 -21
  11. langchain_core/document_loaders/base.py +34 -9
  12. langchain_core/document_loaders/langsmith.py +4 -1
  13. langchain_core/documents/base.py +35 -10
  14. langchain_core/documents/transformers.py +4 -2
  15. langchain_core/embeddings/fake.py +8 -5
  16. langchain_core/env.py +2 -3
  17. langchain_core/example_selectors/base.py +12 -0
  18. langchain_core/exceptions.py +7 -0
  19. langchain_core/globals.py +17 -28
  20. langchain_core/indexing/api.py +88 -76
  21. langchain_core/indexing/base.py +5 -8
  22. langchain_core/indexing/in_memory.py +23 -3
  23. langchain_core/language_models/__init__.py +3 -2
  24. langchain_core/language_models/base.py +31 -20
  25. langchain_core/language_models/chat_models.py +98 -27
  26. langchain_core/language_models/fake_chat_models.py +10 -9
  27. langchain_core/language_models/llms.py +52 -18
  28. langchain_core/load/dump.py +2 -3
  29. langchain_core/load/load.py +15 -1
  30. langchain_core/load/serializable.py +39 -44
  31. langchain_core/memory.py +7 -3
  32. langchain_core/messages/ai.py +53 -24
  33. langchain_core/messages/base.py +43 -22
  34. langchain_core/messages/chat.py +4 -1
  35. langchain_core/messages/content_blocks.py +23 -2
  36. langchain_core/messages/function.py +9 -5
  37. langchain_core/messages/human.py +13 -10
  38. langchain_core/messages/modifier.py +1 -0
  39. langchain_core/messages/system.py +11 -8
  40. langchain_core/messages/tool.py +60 -29
  41. langchain_core/messages/utils.py +250 -131
  42. langchain_core/output_parsers/base.py +5 -2
  43. langchain_core/output_parsers/json.py +4 -4
  44. langchain_core/output_parsers/list.py +7 -22
  45. langchain_core/output_parsers/openai_functions.py +3 -0
  46. langchain_core/output_parsers/openai_tools.py +6 -1
  47. langchain_core/output_parsers/pydantic.py +4 -0
  48. langchain_core/output_parsers/string.py +5 -1
  49. langchain_core/output_parsers/xml.py +19 -19
  50. langchain_core/outputs/chat_generation.py +25 -10
  51. langchain_core/outputs/generation.py +14 -3
  52. langchain_core/outputs/llm_result.py +8 -1
  53. langchain_core/prompt_values.py +16 -6
  54. langchain_core/prompts/base.py +4 -9
  55. langchain_core/prompts/chat.py +89 -57
  56. langchain_core/prompts/dict.py +16 -8
  57. langchain_core/prompts/few_shot.py +12 -11
  58. langchain_core/prompts/few_shot_with_templates.py +5 -1
  59. langchain_core/prompts/image.py +12 -5
  60. langchain_core/prompts/message.py +5 -6
  61. langchain_core/prompts/pipeline.py +13 -8
  62. langchain_core/prompts/prompt.py +22 -8
  63. langchain_core/prompts/string.py +18 -10
  64. langchain_core/prompts/structured.py +7 -2
  65. langchain_core/rate_limiters.py +2 -2
  66. langchain_core/retrievers.py +7 -6
  67. langchain_core/runnables/base.py +406 -186
  68. langchain_core/runnables/branch.py +14 -19
  69. langchain_core/runnables/config.py +9 -15
  70. langchain_core/runnables/configurable.py +34 -19
  71. langchain_core/runnables/fallbacks.py +20 -13
  72. langchain_core/runnables/graph.py +48 -38
  73. langchain_core/runnables/graph_ascii.py +41 -18
  74. langchain_core/runnables/graph_mermaid.py +54 -25
  75. langchain_core/runnables/graph_png.py +27 -31
  76. langchain_core/runnables/history.py +55 -58
  77. langchain_core/runnables/passthrough.py +44 -21
  78. langchain_core/runnables/retry.py +44 -23
  79. langchain_core/runnables/router.py +9 -8
  80. langchain_core/runnables/schema.py +2 -0
  81. langchain_core/runnables/utils.py +51 -89
  82. langchain_core/stores.py +19 -31
  83. langchain_core/sys_info.py +9 -8
  84. langchain_core/tools/base.py +37 -28
  85. langchain_core/tools/convert.py +26 -15
  86. langchain_core/tools/simple.py +36 -8
  87. langchain_core/tools/structured.py +25 -12
  88. langchain_core/tracers/base.py +2 -2
  89. langchain_core/tracers/context.py +5 -1
  90. langchain_core/tracers/core.py +109 -39
  91. langchain_core/tracers/evaluation.py +22 -26
  92. langchain_core/tracers/event_stream.py +45 -34
  93. langchain_core/tracers/langchain.py +12 -3
  94. langchain_core/tracers/langchain_v1.py +10 -2
  95. langchain_core/tracers/log_stream.py +56 -17
  96. langchain_core/tracers/root_listeners.py +4 -20
  97. langchain_core/tracers/run_collector.py +6 -16
  98. langchain_core/tracers/schemas.py +5 -1
  99. langchain_core/utils/aiter.py +15 -7
  100. langchain_core/utils/env.py +3 -0
  101. langchain_core/utils/function_calling.py +50 -28
  102. langchain_core/utils/interactive_env.py +6 -2
  103. langchain_core/utils/iter.py +12 -4
  104. langchain_core/utils/json.py +12 -3
  105. langchain_core/utils/json_schema.py +156 -40
  106. langchain_core/utils/loading.py +5 -1
  107. langchain_core/utils/mustache.py +24 -15
  108. langchain_core/utils/pydantic.py +38 -9
  109. langchain_core/utils/utils.py +25 -9
  110. langchain_core/vectorstores/base.py +7 -20
  111. langchain_core/vectorstores/in_memory.py +23 -17
  112. langchain_core/vectorstores/utils.py +18 -12
  113. langchain_core/version.py +1 -1
  114. langchain_core-0.3.77.dist-info/METADATA +67 -0
  115. langchain_core-0.3.77.dist-info/RECORD +174 -0
  116. langchain_core-0.3.75.dist-info/METADATA +0 -106
  117. langchain_core-0.3.75.dist-info/RECORD +0 -174
  118. {langchain_core-0.3.75.dist-info → langchain_core-0.3.77.dist-info}/WHEEL +0 -0
  119. {langchain_core-0.3.75.dist-info → langchain_core-0.3.77.dist-info}/entry_points.txt +0 -0
@@ -27,6 +27,13 @@ if TYPE_CHECKING:
27
27
  from langchain_core.embeddings import Embeddings
28
28
  from langchain_core.indexing import UpsertResponse
29
29
 
30
+ try:
31
+ import numpy as np
32
+
33
+ _HAS_NUMPY = True
34
+ except ImportError:
35
+ _HAS_NUMPY = False
36
+
30
37
 
31
38
  class InMemoryVectorStore(VectorStore):
32
39
  """In-memory vector store implementation.
@@ -83,11 +90,11 @@ class InMemoryVectorStore(VectorStore):
83
90
  Search:
84
91
  .. code-block:: python
85
92
 
86
- results = vector_store.similarity_search(query="thud",k=1)
93
+ results = vector_store.similarity_search(query="thud", k=1)
87
94
  for doc in results:
88
95
  print(f"* {doc.page_content} [{doc.metadata}]")
89
96
 
90
- .. code-block:: none
97
+ .. code-block::
91
98
 
92
99
  * thud [{'bar': 'baz'}]
93
100
 
@@ -97,13 +104,14 @@ class InMemoryVectorStore(VectorStore):
97
104
  def _filter_function(doc: Document) -> bool:
98
105
  return doc.metadata.get("bar") == "baz"
99
106
 
107
+
100
108
  results = vector_store.similarity_search(
101
109
  query="thud", k=1, filter=_filter_function
102
110
  )
103
111
  for doc in results:
104
112
  print(f"* {doc.page_content} [{doc.metadata}]")
105
113
 
106
- .. code-block:: none
114
+ .. code-block::
107
115
 
108
116
  * thud [{'bar': 'baz'}]
109
117
 
@@ -111,13 +119,11 @@ class InMemoryVectorStore(VectorStore):
111
119
  Search with score:
112
120
  .. code-block:: python
113
121
 
114
- results = vector_store.similarity_search_with_score(
115
- query="qux", k=1
116
- )
122
+ results = vector_store.similarity_search_with_score(query="qux", k=1)
117
123
  for doc, score in results:
118
124
  print(f"* [SIM={score:3f}] {doc.page_content} [{doc.metadata}]")
119
125
 
120
- .. code-block:: none
126
+ .. code-block::
121
127
 
122
128
  * [SIM=0.832268] foo [{'baz': 'bar'}]
123
129
 
@@ -135,10 +141,10 @@ class InMemoryVectorStore(VectorStore):
135
141
 
136
142
  # search with score
137
143
  results = await vector_store.asimilarity_search_with_score(query="qux", k=1)
138
- for doc,score in results:
144
+ for doc, score in results:
139
145
  print(f"* [SIM={score:3f}] {doc.page_content} [{doc.metadata}]")
140
146
 
141
- .. code-block:: none
147
+ .. code-block::
142
148
 
143
149
  * [SIM=0.832268] foo [{'baz': 'bar'}]
144
150
 
@@ -151,7 +157,7 @@ class InMemoryVectorStore(VectorStore):
151
157
  )
152
158
  retriever.invoke("thud")
153
159
 
154
- .. code-block:: none
160
+ .. code-block::
155
161
 
156
162
  [Document(id='2', metadata={'bar': 'baz'}, page_content='thud')]
157
163
 
@@ -190,7 +196,6 @@ class InMemoryVectorStore(VectorStore):
190
196
  ids: Optional[list[str]] = None,
191
197
  **kwargs: Any,
192
198
  ) -> list[str]:
193
- """Add documents to the store."""
194
199
  texts = [doc.page_content for doc in documents]
195
200
  vectors = self.embedding.embed_documents(texts)
196
201
 
@@ -224,7 +229,6 @@ class InMemoryVectorStore(VectorStore):
224
229
  async def aadd_documents(
225
230
  self, documents: list[Document], ids: Optional[list[str]] = None, **kwargs: Any
226
231
  ) -> list[str]:
227
- """Add documents to the store."""
228
232
  texts = [doc.page_content for doc in documents]
229
233
  vectors = await self.embedding.aembed_documents(texts)
230
234
 
@@ -372,7 +376,11 @@ class InMemoryVectorStore(VectorStore):
372
376
  docs = [
373
377
  doc
374
378
  for doc in docs
375
- if filter(Document(page_content=doc["text"], metadata=doc["metadata"]))
379
+ if filter(
380
+ Document(
381
+ id=doc["id"], page_content=doc["text"], metadata=doc["metadata"]
382
+ )
383
+ )
376
384
  ]
377
385
 
378
386
  if not docs:
@@ -499,14 +507,12 @@ class InMemoryVectorStore(VectorStore):
499
507
  filter=filter,
500
508
  )
501
509
 
502
- try:
503
- import numpy as np
504
- except ImportError as e:
510
+ if not _HAS_NUMPY:
505
511
  msg = (
506
512
  "numpy must be installed to use max_marginal_relevance_search "
507
513
  "pip install numpy"
508
514
  )
509
- raise ImportError(msg) from e
515
+ raise ImportError(msg)
510
516
 
511
517
  mmr_chosen_indices = maximal_marginal_relevance(
512
518
  np.array(embedding, dtype=np.float32),
@@ -10,9 +10,21 @@ import logging
10
10
  import warnings
11
11
  from typing import TYPE_CHECKING, Union
12
12
 
13
- if TYPE_CHECKING:
13
+ try:
14
14
  import numpy as np
15
15
 
16
+ _HAS_NUMPY = True
17
+ except ImportError:
18
+ _HAS_NUMPY = False
19
+
20
+ try:
21
+ import simsimd as simd # type: ignore[import-not-found]
22
+
23
+ _HAS_SIMSIMD = True
24
+ except ImportError:
25
+ _HAS_SIMSIMD = False
26
+
27
+ if TYPE_CHECKING:
16
28
  Matrix = Union[list[list[float]], list[np.ndarray], np.ndarray]
17
29
 
18
30
  logger = logging.getLogger(__name__)
@@ -33,14 +45,12 @@ def _cosine_similarity(x: Matrix, y: Matrix) -> np.ndarray:
33
45
  ValueError: If the number of columns in X and Y are not the same.
34
46
  ImportError: If numpy is not installed.
35
47
  """
36
- try:
37
- import numpy as np
38
- except ImportError as e:
48
+ if not _HAS_NUMPY:
39
49
  msg = (
40
50
  "cosine_similarity requires numpy to be installed. "
41
51
  "Please install numpy with `pip install numpy`."
42
52
  )
43
- raise ImportError(msg) from e
53
+ raise ImportError(msg)
44
54
 
45
55
  if len(x) == 0 or len(y) == 0:
46
56
  return np.array([[]])
@@ -70,9 +80,7 @@ def _cosine_similarity(x: Matrix, y: Matrix) -> np.ndarray:
70
80
  f"and Y has shape {y.shape}."
71
81
  )
72
82
  raise ValueError(msg)
73
- try:
74
- import simsimd as simd # type: ignore[import-not-found]
75
- except ImportError:
83
+ if not _HAS_SIMSIMD:
76
84
  logger.debug(
77
85
  "Unable to import simsimd, defaulting to NumPy implementation. If you want "
78
86
  "to use simsimd please install with `pip install simsimd`."
@@ -113,14 +121,12 @@ def maximal_marginal_relevance(
113
121
  Raises:
114
122
  ImportError: If numpy is not installed.
115
123
  """
116
- try:
117
- import numpy as np
118
- except ImportError as e:
124
+ if not _HAS_NUMPY:
119
125
  msg = (
120
126
  "maximal_marginal_relevance requires numpy to be installed. "
121
127
  "Please install numpy with `pip install numpy`."
122
128
  )
123
- raise ImportError(msg) from e
129
+ raise ImportError(msg)
124
130
 
125
131
  if min(k, len(embedding_list)) <= 0:
126
132
  return []
langchain_core/version.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """langchain-core version information and utilities."""
2
2
 
3
- VERSION = "0.3.75"
3
+ VERSION = "0.3.77"
@@ -0,0 +1,67 @@
1
+ Metadata-Version: 2.1
2
+ Name: langchain-core
3
+ Version: 0.3.77
4
+ Summary: Building applications with LLMs through composability
5
+ License: MIT
6
+ Project-URL: Source Code, https://github.com/langchain-ai/langchain/tree/master/libs/core
7
+ Project-URL: Release Notes, https://github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain-core%3D%3D0%22&expanded=true
8
+ Project-URL: repository, https://github.com/langchain-ai/langchain
9
+ Requires-Python: <4.0.0,>=3.9.0
10
+ Requires-Dist: langsmith<1.0.0,>=0.3.45
11
+ Requires-Dist: tenacity!=8.4.0,<10.0.0,>=8.1.0
12
+ Requires-Dist: jsonpatch<2.0.0,>=1.33.0
13
+ Requires-Dist: PyYAML<7.0.0,>=5.3.0
14
+ Requires-Dist: typing-extensions<5.0.0,>=4.7.0
15
+ Requires-Dist: packaging<26.0.0,>=23.2.0
16
+ Requires-Dist: pydantic<3.0.0,>=2.7.4
17
+ Description-Content-Type: text/markdown
18
+
19
+ # 🦜🍎️ LangChain Core
20
+
21
+ [![PyPI - License](https://img.shields.io/pypi/l/langchain-core?style=flat-square)](https://opensource.org/licenses/MIT)
22
+ [![PyPI - Downloads](https://img.shields.io/pepy/dt/langchain-core)](https://pypistats.org/packages/langchain-core)
23
+
24
+ ## Quick Install
25
+
26
+ ```bash
27
+ pip install langchain-core
28
+ ```
29
+
30
+ ## What is it?
31
+
32
+ LangChain Core contains the base abstractions that power the the LangChain ecosystem.
33
+
34
+ These abstractions are designed to be as modular and simple as possible.
35
+
36
+ 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
+
38
+ For full documentation see the [API reference](https://python.langchain.com/api_reference/core/index.html).
39
+
40
+ ## ⛰️ Why build on top of LangChain Core?
41
+
42
+ The LangChain ecosystem is built on top of `langchain-core`. Some of the benefits:
43
+
44
+ - **Modularity**: We've designed Core around abstractions that are independent of each other, and not tied to any specific model provider.
45
+ - **Stability**: We are committed to a stable versioning scheme, and will communicate any breaking changes with advance notice and version bumps.
46
+ - **Battle-tested**: Core components have the largest install base in the LLM ecosystem, and are used in production by many companies.
47
+
48
+ ## 📕 Releases & Versioning
49
+
50
+ As `langchain-core` contains the base abstractions and runtime for the whole LangChain ecosystem, we will communicate any breaking changes with advance notice and version bumps. The exception for this is anything in `langchain_core.beta`. The reason for `langchain_core.beta` is that given the rate of change of the field, being able to move quickly is still a priority, and this module is our attempt to do so.
51
+
52
+ Minor version increases will occur for:
53
+
54
+ - Breaking changes for any public interfaces NOT in `langchain_core.beta`
55
+
56
+ Patch version increases will occur for:
57
+
58
+ - Bug fixes
59
+ - New features
60
+ - Any changes to private interfaces
61
+ - Any changes to `langchain_core.beta`
62
+
63
+ ## 💁 Contributing
64
+
65
+ 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.
66
+
67
+ For detailed information on how to contribute, see the [Contributing Guide](https://python.langchain.com/docs/contributing/).
@@ -0,0 +1,174 @@
1
+ langchain_core-0.3.77.dist-info/METADATA,sha256=mi0rrNStwgWhpu0O2VZE-v0TAtS-9Zw8XVcjGpD_vQg,3155
2
+ langchain_core-0.3.77.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
+ langchain_core-0.3.77.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
+ langchain_core/__init__.py,sha256=TgvhxbrjCRVJwr2HddiyHvtH8W94K-uLM6-6ifNIBXo,713
5
+ langchain_core/_api/__init__.py,sha256=WDOMw4faVuscjDCL5ttnRQNienJP_M9vGMmJUXS6L5w,1976
6
+ langchain_core/_api/beta_decorator.py,sha256=XK7dDgbsyBTiZMjUxVB_bUuuGR1X8T_zBgEBya55mQU,8813
7
+ langchain_core/_api/deprecation.py,sha256=8RKiHrsahdqAL3XkZ0Owutwwc1lF1hRXZHzpVLzS_48,20808
8
+ langchain_core/_api/internal.py,sha256=aOZkYANu747LyWzyAk-0KE4RjdTYj18Wtlh7F9_qyPM,683
9
+ langchain_core/_api/path.py,sha256=raXCzfgMf6AoPo8UP6I1qHRKlIBcBuR18qMHaFyIvhU,1405
10
+ langchain_core/_import_utils.py,sha256=NvAiw5PLvsKCux8LcRndpbZL9m_rHkL1-iWZcNLzQMc,1458
11
+ langchain_core/agents.py,sha256=Z9AFByLkZp__LM_icC699Ge-8dCxPiYQNOdEqrZUiDw,8468
12
+ langchain_core/beta/__init__.py,sha256=8phOlCdTByvzqN1DR4CU_rvaO4SDRebKATmFKj0B5Nw,68
13
+ langchain_core/beta/runnables/__init__.py,sha256=KPVZTs2phF46kEB7mn0M75UeSw8nylbTZ4HYpLT0ywE,17
14
+ langchain_core/beta/runnables/context.py,sha256=kiaDITMNJ8en7n5H5cofFNQ74VChHRsq6VbB1s5Y9F4,13400
15
+ langchain_core/caches.py,sha256=d_6h0Bb0h7sLK0mrQ1BwSljJKnLBvKvoXQMVSnpcqlI,9665
16
+ langchain_core/callbacks/__init__.py,sha256=jXp7StVQk5GeWudGtnnkFV_L-WHCl44ESznc6-0pOVg,4347
17
+ langchain_core/callbacks/base.py,sha256=TRYx7JexS4V-DWr2mlV4K0GiicblC548t1nbjPrjtb0,37325
18
+ langchain_core/callbacks/file.py,sha256=dLBuDRqeLxOBTB9k6c9KEh8dx5UgGfQ9uUF-dhiykZM,8532
19
+ langchain_core/callbacks/manager.py,sha256=CPsmcJUqIkCRi14gJkmFsnNVmCeCuAmtFrhwYUNLau4,91001
20
+ langchain_core/callbacks/stdout.py,sha256=hQ1gjpshNHGdbCS8cH6_oTc4nM8tCWzGNXrbm9dJeaY,4113
21
+ langchain_core/callbacks/streaming_stdout.py,sha256=92UQWxL9HBzdCpn47AF-ZE_jGkkebMn2Z_l24ndMBMI,4646
22
+ langchain_core/callbacks/usage.py,sha256=j9szZlFl0xcnT_IrdHsrwBnimWrviiN186MDMqm_8mM,5097
23
+ langchain_core/chat_history.py,sha256=8dMeYTMwWl1wH64qjW8gq9Cx143eqLV0Qa9xEQ37m5I,8872
24
+ langchain_core/chat_loaders.py,sha256=b57Gl3KGPxq9gYJjetsHfJm1I6kSqi7bDE91fJJOR84,601
25
+ langchain_core/chat_sessions.py,sha256=YEO3ck5_wRGd3a2EnGD7M_wTvNC_4T1IVjQWekagwaM,564
26
+ langchain_core/document_loaders/__init__.py,sha256=DkZPp9cEVmsnz9SM1xtuefH_fGQFvA2WtpRG6iePPBs,975
27
+ langchain_core/document_loaders/base.py,sha256=nBv07847NrsB9EZpC0YU7Zv_Y08T7pisLREMrJwE7Bg,4666
28
+ langchain_core/document_loaders/blob_loaders.py,sha256=4m1k8boiwXw3z4yMYT8bnYUA-eGTPtEZyUxZvI3GbTs,1077
29
+ langchain_core/document_loaders/langsmith.py,sha256=X-FN3z2HFyXZiaoF4-_PO3w_P2UQBIav_V2PyeI_HC0,5514
30
+ langchain_core/documents/__init__.py,sha256=KT_l-TSINKrTXldw5n57wx1yGBtJmGAGxAQL0ceQefc,850
31
+ langchain_core/documents/base.py,sha256=qxf8E06ga9kblxvTECyNXViHoLx1_MWPTM92ATSWlX8,10598
32
+ langchain_core/documents/compressor.py,sha256=91aCQC3W4XMoFXtAmlOCSPb8pSdrirY6Lg8ZLBxTX4s,2001
33
+ langchain_core/documents/transformers.py,sha256=lL0BdmL8xkNO_NqY3vqaLPhPdzte0BUKVoG2IMJqe2s,2584
34
+ langchain_core/embeddings/__init__.py,sha256=0SfcdkVSSXmTFXznUyeZq_b1ajpwIGDueGAAfwyMpUY,774
35
+ langchain_core/embeddings/embeddings.py,sha256=u50T2VxLLyfGBCKcVtWfSiZrtKua8sOSHwSSHRKtcno,2405
36
+ langchain_core/embeddings/fake.py,sha256=iEFwd3j7zGG6EUoCPK-Y9On9C3-q-Lu0Syld27UhsnQ,3954
37
+ langchain_core/env.py,sha256=RHExSWJ2bW-6Wxb6UyBGxU5flLoNYOAeslZ9iTjomQE,598
38
+ langchain_core/example_selectors/__init__.py,sha256=k8y0chtEhaHf8Y1_nZVDsb9CWDdRIWFb9U806mnbGvo,1394
39
+ langchain_core/example_selectors/base.py,sha256=4wRCERHak6Ci5JEKHeidQ_pbBgzQyc-vnQsz2sqBFzA,1716
40
+ langchain_core/example_selectors/length_based.py,sha256=VlWoGhppKrKYKRyi0qBdhq4TbD-6pDHobx3fMGWoqfY,3375
41
+ langchain_core/example_selectors/semantic_similarity.py,sha256=flhao1yNBnaDkM2MlwFd2m4m2dBc_IlEMnmSWV61IVE,13739
42
+ langchain_core/exceptions.py,sha256=JurkMF4p-DOmv7SQJqif7A-5kfKOHCcl8R_wXmMUfSE,3327
43
+ langchain_core/globals.py,sha256=yl9GRxC3INm6AqRplHmKjxr0bn1YWXSU34iul5dnBl8,8823
44
+ langchain_core/indexing/__init__.py,sha256=VOvbbBJYY_UZdMKAeJCdQdszMiAOhAo3Cbht1HEkk8g,1274
45
+ langchain_core/indexing/api.py,sha256=QF_ve0_px0E2blbexv4QkJ-5Q4YV8Ru_QnLKT-3Jy8w,38493
46
+ langchain_core/indexing/base.py,sha256=PWxwX4bH1xq8gKaVnGiNnThPRmwhoDKrJRlEotjtERo,23015
47
+ langchain_core/indexing/in_memory.py,sha256=YPVOGKE3d5-APCy7T0sJvSPjJJUcshSfPeCpq7BA4j0,3326
48
+ langchain_core/language_models/__init__.py,sha256=LBszonEJ6Zu56rVJfSWQt4Q_mr5hD-epcPvSaTClC4E,3764
49
+ langchain_core/language_models/_utils.py,sha256=4TS92kBO5ee4QNH68FFWhX-2uCTe8QaxTXVFMiJLXt4,4786
50
+ langchain_core/language_models/base.py,sha256=cvZOME14JI90NkuDw2Vr1yYx7xKap1dkXgCM8yMu31U,14566
51
+ langchain_core/language_models/chat_models.py,sha256=Kr74J-VJ3IhJFbHVcvx0o-ATP3FDa_IiGDKnBguReJk,72745
52
+ langchain_core/language_models/fake.py,sha256=h9LhVTkmYLXkJ1_VvsKhqYVpkQsM7eAr9geXF_IVkPs,3772
53
+ langchain_core/language_models/fake_chat_models.py,sha256=UXhL11SzW-zE8keke6YINcZ1s2_oA_jz3YoQiqnPxzM,12829
54
+ langchain_core/language_models/llms.py,sha256=qPUNKqpVw0MTdOH7aZ3gLwC1Bh0O4k91vwSo_9rv5xw,58013
55
+ langchain_core/load/__init__.py,sha256=m3_6Fk2gpYZO0xqyTnZzdQigvsYHjMariLq_L2KwJFk,1150
56
+ langchain_core/load/dump.py,sha256=N34h-I3VeLFzuwrYlVSY_gFx0iaZhEi72D04yxkx3cc,2654
57
+ langchain_core/load/load.py,sha256=eDyYNBGbfVDLGOA3p2cAOWY0rLqbf9E9qNfstw0PKDY,9729
58
+ langchain_core/load/mapping.py,sha256=nnFXiTdQkfdv41_wP38aWGtpp9svxW6fwVyC3LmRkok,29633
59
+ langchain_core/load/serializable.py,sha256=apzQHx9h2qzMX2GVpi3qjZsmUlC9LD4gKd_kAur5kbk,11753
60
+ langchain_core/memory.py,sha256=bYgZGSldIa79GqpEd2m9Ve78euCq6SJatzTsHAHKosk,3693
61
+ langchain_core/messages/__init__.py,sha256=8H1BnLGi2oSXdIz_LWtVAwmxFvK_6_CqiDRq2jnGtw0,4253
62
+ langchain_core/messages/ai.py,sha256=BysrISBTe_BhVBnKw472XubhVQBqft99zQugIyfbhp4,18498
63
+ langchain_core/messages/base.py,sha256=OpJsursmDJ6WBsfgvBhe8XkLDtC8TEtADJlV7zmpk4Y,9638
64
+ langchain_core/messages/chat.py,sha256=Ls1SOFVsrVaRf4KuIQajy9pQOCWO-Dai9CA34sRuGgM,2271
65
+ langchain_core/messages/content_blocks.py,sha256=E_AvS5yy1JHPquyKN7Wj5A7Gl9AvxOAGgR770FVhhtk,5487
66
+ langchain_core/messages/function.py,sha256=Kd_GJFpctdf2JYfRiKK5j9I-YQ_XumKDouEpalXE-Xw,2189
67
+ langchain_core/messages/human.py,sha256=UZjG3KJLX8IF2VrYtj8EQ_O9tLjz-Xlp8gL60qDRQyU,1885
68
+ langchain_core/messages/modifier.py,sha256=N0vSbZa1jpzMom8_Vr0hr-ZAJi9eh1I8NkMVB5TQ2RI,895
69
+ langchain_core/messages/system.py,sha256=cMSNtauXX9AJ7NiJ8tYXa0rrVT46s-6t09Ec00la3PQ,1692
70
+ langchain_core/messages/tool.py,sha256=DiJQUmrOnRDUz74q7jofvJwbh_ghnT50iveMeGfy2hY,12668
71
+ langchain_core/messages/utils.py,sha256=ds872YzqNiOqEIrloCEjFCXAiWicswofFEYy1KG4HGM,70469
72
+ langchain_core/output_parsers/__init__.py,sha256=R8L0GwY-vD9qvqze3EVELXF6i45IYUJ_FbSfno_IREg,2873
73
+ langchain_core/output_parsers/base.py,sha256=53Yt9dOlR686ku0dP2LK9hHKGprxw_YEsAsY04dejmE,11225
74
+ langchain_core/output_parsers/format_instructions.py,sha256=8oUbeysnVGvXWyNd5gqXlEL850D31gMTy74GflsuvRU,553
75
+ langchain_core/output_parsers/json.py,sha256=Z_mcfO9jdAH96dZXrSi4rEx3o7Z9Oqn_IBkOjLBDpaQ,4589
76
+ langchain_core/output_parsers/list.py,sha256=WJ1fgGH2vnh_TRgGd83WZKVKGGpcqu-Q8zjDseqIA0Y,7294
77
+ langchain_core/output_parsers/openai_functions.py,sha256=FFy2Wh39wPFM1mO222gMzQU_wrpIFiCo5unZM8PM3jQ,10793
78
+ langchain_core/output_parsers/openai_tools.py,sha256=2zBuswllEu_gwN7iAd3Yvifr6XIJcvyMIVa1ER68-_k,12606
79
+ langchain_core/output_parsers/pydantic.py,sha256=mwB5HNa4KHLt_kD7gbwWyXSX-GnM1gX0nsM00b0OVAE,4490
80
+ langchain_core/output_parsers/string.py,sha256=jlUsciPkCmZ3MOfhz-KUJDjSaR0VswnzH8z0KlIfAoQ,965
81
+ langchain_core/output_parsers/transform.py,sha256=ntWW0SKk6GUHXQNXHZvT1PhyedQrvF61oIo_fP63fRQ,5923
82
+ langchain_core/output_parsers/xml.py,sha256=MDjZHJY2KeYREPLlEQJ1M2r0ALa0nb1Wec7MJ4Nk6LA,10974
83
+ langchain_core/outputs/__init__.py,sha256=uy2aeRTvvIfyWeLtPs0KaCw0VpG6QTkC0esmj268BIM,2119
84
+ langchain_core/outputs/chat_generation.py,sha256=IU5NnVbKXj7CJpCg_Wd3rYfVOj9lcHdwNtopXMW7-2I,4789
85
+ langchain_core/outputs/chat_result.py,sha256=us15wVh00AYkIVNmf0VETEI9aoEQy-cT-SIXMX-98Zc,1356
86
+ langchain_core/outputs/generation.py,sha256=zroWD-bJxmdKJWbt1Rv-jVImyOng5s8rEn8bHMtjaLo,2644
87
+ langchain_core/outputs/llm_result.py,sha256=aX81609Z5JrLQGx9u2l6UDdzMLRoLgvdr5k1xDmB4UI,3935
88
+ langchain_core/outputs/run_info.py,sha256=xCMWdsHfgnnodaf4OCMvZaWUfS836X7mV15JPkqvZjo,594
89
+ langchain_core/prompt_values.py,sha256=jBcTRoLt0PRg3yJir0Mbg_CV29X2iiK9yFwXRrtiO_4,4112
90
+ langchain_core/prompts/__init__.py,sha256=sp3NU858CEf4YUuDYiY_-iF1x1Gb5msSyoyrk2FUI94,4123
91
+ langchain_core/prompts/base.py,sha256=g95varYAcsNY-2ILWrLhvQOMOw_qYr9ft7XqHgMkKbE,15971
92
+ langchain_core/prompts/chat.py,sha256=GxGKpv-pTmvpvOr79xzN7EMSnvgz7rYfO7gykipGJi0,52707
93
+ langchain_core/prompts/dict.py,sha256=e4rxVs2IkMjxN_NqYtRpb9NYLyE9mimMMSzawbubrfA,4732
94
+ langchain_core/prompts/few_shot.py,sha256=z1B-otzpEp5pg9V257mG0V53e6KHYu0ZLw6BjAXauq0,16200
95
+ langchain_core/prompts/few_shot_with_templates.py,sha256=z1fSlcHunfdVQc7BuM9tudCWMquUn2Zztw7ROXOEOgE,7839
96
+ langchain_core/prompts/image.py,sha256=rrwpPo3nb2k_8I1DYF3cZv3go0T_CmSUrJsIktrQtgA,4786
97
+ langchain_core/prompts/loading.py,sha256=_T26PCTuZuOsCkHk_uv-h_zoIMonXojBdYJA3UsWHXE,6907
98
+ langchain_core/prompts/message.py,sha256=9I5IZXFn2Bwv8CIZ0zMp7k8C48xQyiAOqyv6uAYJdY0,2624
99
+ langchain_core/prompts/pipeline.py,sha256=Zj6aqIcU874mnYG__0I4nHmz4p7uaNAdYsJpMDb1LyQ,4612
100
+ langchain_core/prompts/prompt.py,sha256=RfD-w7GKolgptGB72UVIb1q3iIOm4pv2hby6EmJf9kk,11667
101
+ langchain_core/prompts/string.py,sha256=biN76hgwqZx-SjtXgy3qe9QmM2I2STSg8DylD0Mf0RE,10361
102
+ langchain_core/prompts/structured.py,sha256=V5qfOpSPWBnF5xcRl_qEmrv1u7T_IfzONHJ-rUFiTyE,5957
103
+ langchain_core/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
104
+ langchain_core/pydantic_v1/__init__.py,sha256=hqAsQjsfqLduCo5E0oAAAt21Nkls0S6bCQ4tD2moFfU,1080
105
+ langchain_core/pydantic_v1/dataclasses.py,sha256=q4Qst8I0g7odncWZ3-MvW-Xadfu6DQYxCo-DFZgwLPE,889
106
+ langchain_core/pydantic_v1/main.py,sha256=uTB_757DTfo-mFKJUn_a4qS_GxmSxlqYmL2WOCJLdS0,882
107
+ langchain_core/rate_limiters.py,sha256=EZtViY5BZLPBg_JBvv_kYywV9Cl3wd6AC-SDEA0fPPg,9550
108
+ langchain_core/retrievers.py,sha256=622gKRLmBSUXi_o4z57EoctT32XRbqCk_5f_NU7MEFE,16710
109
+ langchain_core/runnables/__init__.py,sha256=efTnFjwN_QSAv5ThLmKuWeu8P1BLARH-cWKZBuimfDM,3858
110
+ langchain_core/runnables/base.py,sha256=iz4CmsrXMdDd5BxMB0NruHYR-9S5tHinmOCpLzUu5fA,228886
111
+ langchain_core/runnables/branch.py,sha256=enKt0Qgc3b2UQSWGtQLcTlhOUNJGXfqNeaQwSq9AEkg,16338
112
+ langchain_core/runnables/config.py,sha256=lT2RORiOlFPalxPB11TV_eSAMIi1dAiIzCyfmZariZw,20297
113
+ langchain_core/runnables/configurable.py,sha256=Ios0MDPViYO9nO_EltAlkDkNNxdz4zXuNcZ1cuHZwzw,24695
114
+ langchain_core/runnables/fallbacks.py,sha256=VeHCrW_Ci9p8G9KojNp5dC7Yo6l5jdZtst9O_yt2sM0,24497
115
+ langchain_core/runnables/graph.py,sha256=60uOAcwD0lXPrMhPAeOTndYINtalGFz8zgaV14ig5dk,23922
116
+ langchain_core/runnables/graph_ascii.py,sha256=-bFEYD_aoQ5d_kIzn7nWLWd0R6yLkGmUJ6FIYgLvRgk,10441
117
+ langchain_core/runnables/graph_mermaid.py,sha256=LQZz4hVisPo7ZvsI_-xd2fCInwsHfFVTicbzNrZXWy8,17415
118
+ langchain_core/runnables/graph_png.py,sha256=md4NFNKMY7SkAr3Ysf1FNOU-SIZioSkniT__IPkoUSA,5566
119
+ langchain_core/runnables/history.py,sha256=CeFI41kBoowUKsCuFu1HeEgBIuyhh2oEhcuUyPs_j6M,24775
120
+ langchain_core/runnables/passthrough.py,sha256=HvwNeGVVzhS6EkSurbjU8Ah-UXUj3nsrhiY-gmeyxhE,26443
121
+ langchain_core/runnables/retry.py,sha256=gDvUiUIPQHY3fXIM1ZB6cFovDYrfIOqlvHZnOB0IBVs,13898
122
+ langchain_core/runnables/router.py,sha256=HYGMfOYhpdyL3OlrEjYj1bKqEjDFyWEvFDXx2BoV3s4,7236
123
+ langchain_core/runnables/schema.py,sha256=ff7PsRswAeQgVEeGybzC3rvaoDHV2S8pNCwpwppRjAY,5545
124
+ langchain_core/runnables/utils.py,sha256=zfC4orjXPcj_zpTO2yTvz04RPAwTt2HxW6kFPYkximQ,22843
125
+ langchain_core/stores.py,sha256=bjZbmXSGhkCHHUQWmiTxVbmGcwggaR9KH1pxe2Gkqko,10644
126
+ langchain_core/structured_query.py,sha256=SmeP7cYTx2OCxOEo9UsSiHO3seqIoZPjb0CQd8JDWRk,5164
127
+ langchain_core/sys_info.py,sha256=HG1fu2ayPvRQmrlowyO-NdUj_I8Le1S-bPAbYB9VJTY,4045
128
+ langchain_core/tools/__init__.py,sha256=Uqcn6gFAoFbMM4aRXd8ACL4D-owdevGc37Gn-KOB8JU,2860
129
+ langchain_core/tools/base.py,sha256=Ha4_hAiAiyZNCtBVPTaIjLIUAZzQouohN2cYVBdpP4w,50302
130
+ langchain_core/tools/convert.py,sha256=DYP5Cx0L8qnLHmNvRdwHy-VUbNomEb9XEMJiyfYMtgQ,16318
131
+ langchain_core/tools/render.py,sha256=BosvIWrSvOJgRg_gaSDBS58j99gwQHsLhprOXeJP53I,1842
132
+ langchain_core/tools/retriever.py,sha256=zlSV3HnWhhmtZtkNGbNQW9wxv8GptJKmDhzqZj8e36o,3873
133
+ langchain_core/tools/simple.py,sha256=tW97_Qe4VWJymtXFtN8WRxNk0t4SmLIcgMnz5cq3aQU,6761
134
+ langchain_core/tools/structured.py,sha256=DYnck1Y5GRfBDcg6TRDAgVzTYyL6gAmCuN1a5C04NTU,9463
135
+ langchain_core/tracers/__init__.py,sha256=ixZmLjtoMEPqYEFUtAxleiDDRNIaHrS01VRDo9mCPk8,1611
136
+ langchain_core/tracers/_streaming.py,sha256=U9pWQDJNUDH4oOYF3zvUMUtgkCecJzXQvfo-wYARmhQ,982
137
+ langchain_core/tracers/base.py,sha256=rbIJgMaDga3jFeCWCmzjqUZLMmp9ZczT4wFecVPL2hk,26013
138
+ langchain_core/tracers/context.py,sha256=xCgMjCoulBm3QXjLaVDFC8-93emgsunYcCtZCiVKcTo,7199
139
+ langchain_core/tracers/core.py,sha256=a40PCXd_2Yh8-drVfr1MJynvw9eUecocTWu-EIFwaDU,23773
140
+ langchain_core/tracers/evaluation.py,sha256=o0iIcuYx_mlD8q5_N7yxiVIaGeC3JaepHlZks0xm0nQ,8426
141
+ langchain_core/tracers/event_stream.py,sha256=5c_HFzeIBlmG_cA-P_EJFJoiIuzlzxmlB3LQ1kx53-0,33785
142
+ langchain_core/tracers/langchain.py,sha256=bvavDPE5t2J2BNexot0cHsD0asSeoofNtWAQqYbBvTQ,10620
143
+ langchain_core/tracers/langchain_v1.py,sha256=QteCXOsETqngvigalofcKR3l6le6barotAtWHaE8a1w,898
144
+ langchain_core/tracers/log_stream.py,sha256=jaW3tOvBxR4FgSZj4lS9pjVCdc4Y8_DUJoudAEcC-wQ,25491
145
+ langchain_core/tracers/memory_stream.py,sha256=3A-cwA3-lq5YFbCZWYM8kglVv1bPT4kwM2L_q8axkhU,5032
146
+ langchain_core/tracers/root_listeners.py,sha256=44cr4itZknl2VaYS3pNitJIy2DOKmZC09WWeHIBjOnU,4184
147
+ langchain_core/tracers/run_collector.py,sha256=FZkocT41EichTy2QyETbhZjlOptyj-peOhEQUqEcJGg,1305
148
+ langchain_core/tracers/schemas.py,sha256=y16K_c1ji3LHD-addSkn4-n73eknS2RlNRAhTSgs_YM,3826
149
+ langchain_core/tracers/stdout.py,sha256=aZN-yz545zj34kYfrEmYzWeSz83pbqN8wNqi-ZvS1Iw,6732
150
+ langchain_core/utils/__init__.py,sha256=N0ZeV09FHvZIVITLJlqGibb0JNtmmLvvoareFtG0DuI,3169
151
+ langchain_core/utils/_merge.py,sha256=uo_n2mJ0_FuRJZUUgJemsXQ8rAC9fyYGOMmnPfbbDUg,5785
152
+ langchain_core/utils/aiter.py,sha256=-ewdOx7u3PiickfNcylzPAsxr9_a1-z8xxpZsKyN-eI,10891
153
+ langchain_core/utils/env.py,sha256=5EnSNXr4oHAkGkKfrNf0xl_vqz2ejVKVMUQaQePXv9s,2536
154
+ langchain_core/utils/formatting.py,sha256=fkieArzKXxSsLcEa3B-MX60O4ZLeeLjiPtVtxCJPcOU,1480
155
+ langchain_core/utils/function_calling.py,sha256=ox7Qm6V3pGzTCFLPCyLcwgttI3vViHoYRYPegqjpmUY,29645
156
+ langchain_core/utils/html.py,sha256=fUogMGhd-VoUbsGnMyY6v_gv9nbxJy-vmC4yfICcflM,3780
157
+ langchain_core/utils/image.py,sha256=1MH8Lbg0f2HfhTC4zobKMvpVoHRfpsyvWHq9ae4xENo,532
158
+ langchain_core/utils/input.py,sha256=z3tubdUtsoHqfTyiBGfELLr1xemSe-pGvhfAeGE6O2g,1958
159
+ langchain_core/utils/interactive_env.py,sha256=nm06cucX9ez9H3GBAIRDsivSp0V--2HnBIMogI4gHpQ,287
160
+ langchain_core/utils/iter.py,sha256=skjmuEEkBFQQu0bvE5n33iuqAquYG5lMfOiGqhdOxgU,7559
161
+ langchain_core/utils/json.py,sha256=OhhQvE7NOeDhQGxn0vUU9_g4wBu167A3w7Ou9SX419o,6537
162
+ langchain_core/utils/json_schema.py,sha256=9fdA1Gb-pLfpcgSOJxxjMt1FqiWi0K95tNjWtlFgMgs,9102
163
+ langchain_core/utils/loading.py,sha256=zHY3y-eW_quqgJDJNY24dO7YDZW9P103Mc77dnGbEpA,1023
164
+ langchain_core/utils/mustache.py,sha256=j_BJH-axSkE-_DHPXx4xuIO_eqMsd9YaHm0VMtculvg,21373
165
+ langchain_core/utils/pydantic.py,sha256=6IQLwQODfupvtPcQTSOLA57vFKqA-b_xWenjOMwZzGU,18663
166
+ langchain_core/utils/strings.py,sha256=0LaQiqpshHwMrWBGvNfFPc-AxihLGMM9vsQcSx3uAkI,1804
167
+ langchain_core/utils/usage.py,sha256=EYv0poDqA7VejEsPyoA19lEt9M4L24Tppf4OPtOjGwI,1202
168
+ langchain_core/utils/utils.py,sha256=RTICumH0h3Yx1WCYdd_9pffff9haVkoAVkvbJdlqTko,15455
169
+ langchain_core/vectorstores/__init__.py,sha256=5P0eoeoH5LHab64JjmEeWa6SxX4eMy-etAP1MEHsETY,804
170
+ langchain_core/vectorstores/base.py,sha256=nWlfzbkVdOObfbPpvfdLKHw9J0PryACVohHC_Y6wWZM,41529
171
+ langchain_core/vectorstores/in_memory.py,sha256=btq53JnPZHMRGCbejVx1H-6RSNRAgtacd-XAx6dt-Q8,18076
172
+ langchain_core/vectorstores/utils.py,sha256=D6St53Xg1kO73dnw4MPd8vlkro4C3gmCpcghUzcepi0,4971
173
+ langchain_core/version.py,sha256=BV6kJkydC-YxBFj9-ENNXDRLAAS3qhnj70qoZSwkSR0,76
174
+ langchain_core-0.3.77.dist-info/RECORD,,
@@ -1,106 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: langchain-core
3
- Version: 0.3.75
4
- Summary: Building applications with LLMs through composability
5
- License: MIT
6
- Project-URL: Source Code, https://github.com/langchain-ai/langchain/tree/master/libs/core
7
- Project-URL: Release Notes, https://github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain-core%3D%3D0%22&expanded=true
8
- Project-URL: repository, https://github.com/langchain-ai/langchain
9
- Requires-Python: >=3.9
10
- Requires-Dist: langsmith>=0.3.45
11
- Requires-Dist: tenacity!=8.4.0,<10.0.0,>=8.1.0
12
- Requires-Dist: jsonpatch<2.0,>=1.33
13
- Requires-Dist: PyYAML>=5.3
14
- Requires-Dist: typing-extensions>=4.7
15
- Requires-Dist: packaging>=23.2
16
- Requires-Dist: pydantic>=2.7.4
17
- Description-Content-Type: text/markdown
18
-
19
- # 🦜🍎️ LangChain Core
20
-
21
- [![Downloads](https://static.pepy.tech/badge/langchain_core/month)](https://pepy.tech/project/langchain_core)
22
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
23
-
24
- ## Quick Install
25
-
26
- ```bash
27
- pip install langchain-core
28
- ```
29
-
30
- ## What is it?
31
-
32
- LangChain Core contains the base abstractions that power the rest of the LangChain ecosystem.
33
-
34
- These abstractions are designed to be as modular and simple as possible. Examples of these abstractions include those for language models, document loaders, embedding models, vectorstores, retrievers, and more.
35
-
36
- 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
-
38
- For full documentation see the [API reference](https://python.langchain.com/api_reference/core/index.html).
39
-
40
- ## 1️⃣ Core Interface: Runnables
41
-
42
- The concept of a `Runnable` is central to LangChain Core – it is the interface that most LangChain Core components implement, giving them
43
-
44
- - a common invocation interface (`invoke()`, `batch()`, `stream()`, etc.)
45
- - built-in utilities for retries, fallbacks, schemas and runtime configurability
46
- - easy deployment with [LangGraph](https://github.com/langchain-ai/langgraph)
47
-
48
- For more check out the [runnable docs](https://python.langchain.com/docs/concepts/runnables/). Examples of components that implement the interface include: LLMs, Chat Models, Prompts, Retrievers, Tools, Output Parsers.
49
-
50
- You can use LangChain Core objects in two ways:
51
-
52
- 1. **imperative**, ie. call them directly, eg. `model.invoke(...)`
53
-
54
- 2. **declarative**, with LangChain Expression Language (LCEL)
55
-
56
- 3. or a mix of both! eg. one of the steps in your LCEL sequence can be a custom function
57
-
58
- | Feature | Imperative | Declarative |
59
- | --------- | ------------------------------- | -------------- |
60
- | Syntax | All of Python | LCEL |
61
- | Tracing | ✅ – Automatic | ✅ – Automatic |
62
- | Parallel | ✅ – with threads or coroutines | ✅ – Automatic |
63
- | Streaming | ✅ – by yielding | ✅ – Automatic |
64
- | Async | ✅ – by writing async functions | ✅ – Automatic |
65
-
66
- ## ⚡️ What is LangChain Expression Language?
67
-
68
- LangChain Expression Language (LCEL) is a _declarative language_ for composing LangChain Core runnables into sequences (or DAGs), covering the most common patterns when building with LLMs.
69
-
70
- LangChain Core compiles LCEL sequences to an _optimized execution plan_, with automatic parallelization, streaming, tracing, and async support.
71
-
72
- For more check out the [LCEL docs](https://python.langchain.com/docs/concepts/lcel/).
73
-
74
- ![Diagram outlining the hierarchical organization of the LangChain framework, displaying the interconnected parts across multiple layers.](https://raw.githubusercontent.com/langchain-ai/langchain/master/docs/static/svg/langchain_stack_112024.svg "LangChain Framework Overview")
75
-
76
- For more advanced use cases, also check out [LangGraph](https://github.com/langchain-ai/langgraph), which is a graph-based runner for cyclic and recursive LLM workflows.
77
-
78
- ## 📕 Releases & Versioning
79
-
80
- As `langchain-core` contains the base abstractions and runtime for the whole LangChain ecosystem, we will communicate any breaking changes with advance notice and version bumps. The exception for this is anything in `langchain_core.beta`. The reason for `langchain_core.beta` is that given the rate of change of the field, being able to move quickly is still a priority, and this module is our attempt to do so.
81
-
82
- Minor version increases will occur for:
83
-
84
- - Breaking changes for any public interfaces NOT in `langchain_core.beta`
85
-
86
- Patch version increases will occur for:
87
-
88
- - Bug fixes
89
- - New features
90
- - Any changes to private interfaces
91
- - Any changes to `langchain_core.beta`
92
-
93
- ## 💁 Contributing
94
-
95
- 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.
96
-
97
- For detailed information on how to contribute, see the [Contributing Guide](https://python.langchain.com/docs/contributing/).
98
-
99
- ## ⛰️ Why build on top of LangChain Core?
100
-
101
- The whole LangChain ecosystem is built on top of LangChain Core, so you're in good company when building on top of it. Some of the benefits:
102
-
103
- - **Modularity**: LangChain Core is designed around abstractions that are independent of each other, and not tied to any specific model provider.
104
- - **Stability**: We are committed to a stable versioning scheme, and will communicate any breaking changes with advance notice and version bumps.
105
- - **Battle-tested**: LangChain Core components have the largest install base in the LLM ecosystem, and are used in production by many companies.
106
- - **Community**: LangChain Core is developed in the open, and we welcome contributions from the community.