langchain-core 1.0.0a8__tar.gz → 1.0.0rc2__tar.gz

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.
Files changed (368) hide show
  1. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/PKG-INFO +23 -11
  2. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/README.md +16 -7
  3. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/__init__.py +1 -1
  4. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/_api/__init__.py +0 -1
  5. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/_api/beta_decorator.py +17 -20
  6. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/_api/deprecation.py +30 -35
  7. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/_import_utils.py +1 -1
  8. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/agents.py +10 -9
  9. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/caches.py +46 -56
  10. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/callbacks/__init__.py +1 -8
  11. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/callbacks/base.py +232 -243
  12. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/callbacks/file.py +33 -33
  13. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/callbacks/manager.py +353 -416
  14. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/callbacks/stdout.py +21 -22
  15. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/callbacks/streaming_stdout.py +32 -32
  16. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/callbacks/usage.py +54 -51
  17. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/chat_history.py +43 -58
  18. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/document_loaders/base.py +21 -21
  19. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/document_loaders/langsmith.py +22 -22
  20. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/documents/__init__.py +0 -1
  21. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/documents/base.py +46 -49
  22. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/documents/transformers.py +28 -29
  23. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/embeddings/fake.py +50 -54
  24. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/example_selectors/semantic_similarity.py +4 -6
  25. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/exceptions.py +7 -8
  26. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/indexing/api.py +19 -25
  27. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/indexing/base.py +24 -24
  28. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/language_models/__init__.py +11 -27
  29. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/language_models/_utils.py +53 -54
  30. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/language_models/base.py +30 -24
  31. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/language_models/chat_models.py +123 -148
  32. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/language_models/fake_chat_models.py +7 -7
  33. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/language_models/llms.py +14 -16
  34. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/load/dump.py +3 -4
  35. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/load/load.py +7 -16
  36. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/load/serializable.py +37 -36
  37. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/messages/__init__.py +1 -16
  38. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/messages/ai.py +122 -123
  39. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/messages/base.py +31 -31
  40. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/messages/block_translators/__init__.py +17 -17
  41. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/messages/block_translators/anthropic.py +3 -3
  42. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/messages/block_translators/bedrock_converse.py +3 -3
  43. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/messages/block_translators/google_genai.py +5 -4
  44. langchain_core-1.0.0rc2/langchain_core/messages/block_translators/google_vertexai.py +21 -0
  45. langchain_core-1.0.0rc2/langchain_core/messages/block_translators/groq.py +143 -0
  46. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/messages/block_translators/langchain_v0.py +3 -3
  47. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/messages/block_translators/openai.py +5 -5
  48. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/messages/chat.py +2 -6
  49. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/messages/content.py +222 -209
  50. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/messages/function.py +6 -10
  51. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/messages/human.py +17 -24
  52. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/messages/modifier.py +2 -2
  53. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/messages/system.py +12 -22
  54. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/messages/tool.py +53 -69
  55. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/messages/utils.py +399 -417
  56. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/output_parsers/__init__.py +1 -14
  57. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/output_parsers/base.py +46 -47
  58. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/output_parsers/json.py +3 -4
  59. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/output_parsers/list.py +2 -2
  60. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/output_parsers/openai_functions.py +46 -44
  61. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/output_parsers/openai_tools.py +11 -16
  62. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/output_parsers/pydantic.py +10 -11
  63. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/output_parsers/string.py +2 -2
  64. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/output_parsers/transform.py +2 -2
  65. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/output_parsers/xml.py +1 -1
  66. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/outputs/__init__.py +1 -1
  67. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/outputs/chat_generation.py +14 -14
  68. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/outputs/generation.py +6 -6
  69. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/outputs/llm_result.py +5 -5
  70. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/prompt_values.py +11 -11
  71. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/prompts/__init__.py +3 -23
  72. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/prompts/base.py +33 -38
  73. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/prompts/chat.py +222 -229
  74. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/prompts/dict.py +3 -3
  75. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/prompts/few_shot.py +76 -83
  76. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/prompts/few_shot_with_templates.py +7 -9
  77. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/prompts/image.py +12 -14
  78. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/prompts/loading.py +1 -1
  79. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/prompts/message.py +3 -3
  80. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/prompts/prompt.py +20 -23
  81. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/prompts/string.py +20 -8
  82. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/prompts/structured.py +26 -27
  83. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/rate_limiters.py +50 -58
  84. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/retrievers.py +41 -182
  85. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/runnables/base.py +565 -597
  86. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/runnables/branch.py +8 -8
  87. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/runnables/config.py +37 -44
  88. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/runnables/configurable.py +9 -10
  89. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/runnables/fallbacks.py +9 -9
  90. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/runnables/graph.py +46 -50
  91. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/runnables/graph_ascii.py +19 -18
  92. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/runnables/graph_mermaid.py +20 -31
  93. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/runnables/graph_png.py +7 -7
  94. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/runnables/history.py +22 -22
  95. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/runnables/passthrough.py +11 -11
  96. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/runnables/retry.py +3 -3
  97. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/runnables/router.py +2 -2
  98. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/runnables/schema.py +33 -33
  99. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/runnables/utils.py +30 -34
  100. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/stores.py +72 -102
  101. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/sys_info.py +27 -29
  102. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tools/__init__.py +1 -14
  103. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tools/base.py +70 -71
  104. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tools/convert.py +100 -104
  105. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tools/render.py +9 -9
  106. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tools/retriever.py +7 -7
  107. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tools/simple.py +6 -7
  108. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tools/structured.py +18 -24
  109. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tracers/__init__.py +1 -9
  110. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tracers/base.py +35 -35
  111. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tracers/context.py +12 -17
  112. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tracers/event_stream.py +3 -3
  113. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tracers/langchain.py +8 -8
  114. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tracers/log_stream.py +17 -18
  115. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tracers/memory_stream.py +3 -3
  116. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tracers/root_listeners.py +2 -2
  117. langchain_core-1.0.0rc2/langchain_core/tracers/schemas.py +14 -0
  118. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tracers/stdout.py +1 -2
  119. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/utils/__init__.py +1 -1
  120. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/utils/aiter.py +32 -32
  121. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/utils/env.py +5 -5
  122. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/utils/function_calling.py +59 -154
  123. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/utils/html.py +4 -4
  124. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/utils/input.py +3 -3
  125. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/utils/interactive_env.py +1 -1
  126. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/utils/iter.py +20 -20
  127. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/utils/json.py +1 -1
  128. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/utils/json_schema.py +2 -2
  129. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/utils/mustache.py +5 -5
  130. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/utils/pydantic.py +17 -17
  131. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/utils/strings.py +5 -5
  132. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/utils/utils.py +25 -28
  133. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/vectorstores/base.py +55 -87
  134. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/vectorstores/in_memory.py +83 -85
  135. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/vectorstores/utils.py +2 -2
  136. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/version.py +1 -1
  137. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/pyproject.toml +8 -5
  138. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/conftest.py +4 -5
  139. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/language_models/chat_models/test_base.py +10 -1
  140. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/language_models/chat_models/test_cache.py +2 -2
  141. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/language_models/llms/test_cache.py +4 -4
  142. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/messages/block_translators/test_registration.py +2 -2
  143. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/messages/test_ai.py +3 -14
  144. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/output_parsers/test_base_parsers.py +2 -2
  145. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/prompts/__snapshots__/test_chat.ambr +208 -222
  146. langchain_core-1.0.0rc2/tests/unit_tests/prompts/test_string.py +32 -0
  147. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/prompts/test_structured.py +1 -1
  148. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/runnables/__snapshots__/test_graph.ambr +101 -108
  149. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/runnables/__snapshots__/test_runnable.ambr +832 -888
  150. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/runnables/test_runnable.py +6 -7
  151. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/test_tools.py +5 -6
  152. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/tracers/test_run_collector.py +2 -2
  153. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/tracers/test_schemas.py +0 -10
  154. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/utils/test_function_calling.py +2 -4
  155. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/utils/test_utils.py +1 -1
  156. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/uv.lock +1 -1
  157. langchain_core-1.0.0a8/langchain_core/memory.py +0 -120
  158. langchain_core-1.0.0a8/langchain_core/messages/block_translators/google_vertexai.py +0 -49
  159. langchain_core-1.0.0a8/langchain_core/messages/block_translators/groq.py +0 -47
  160. langchain_core-1.0.0a8/langchain_core/pydantic_v1/__init__.py +0 -30
  161. langchain_core-1.0.0a8/langchain_core/pydantic_v1/dataclasses.py +0 -23
  162. langchain_core-1.0.0a8/langchain_core/pydantic_v1/main.py +0 -23
  163. langchain_core-1.0.0a8/langchain_core/tracers/schemas.py +0 -143
  164. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/.gitignore +0 -0
  165. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/Makefile +0 -0
  166. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/extended_testing_deps.txt +0 -0
  167. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/_api/internal.py +0 -0
  168. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/_api/path.py +0 -0
  169. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/chat_loaders.py +0 -0
  170. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/chat_sessions.py +0 -0
  171. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/document_loaders/__init__.py +0 -0
  172. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/document_loaders/blob_loaders.py +0 -0
  173. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/documents/compressor.py +0 -0
  174. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/embeddings/__init__.py +0 -0
  175. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/embeddings/embeddings.py +0 -0
  176. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/env.py +0 -0
  177. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/example_selectors/__init__.py +0 -0
  178. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/example_selectors/base.py +0 -0
  179. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/example_selectors/length_based.py +0 -0
  180. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/globals.py +0 -0
  181. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/indexing/__init__.py +0 -0
  182. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/indexing/in_memory.py +0 -0
  183. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/language_models/fake.py +0 -0
  184. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/load/__init__.py +0 -0
  185. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/load/mapping.py +0 -0
  186. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/messages/block_translators/bedrock.py +0 -0
  187. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/output_parsers/format_instructions.py +0 -0
  188. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/outputs/chat_result.py +0 -0
  189. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/outputs/run_info.py +0 -0
  190. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/py.typed +0 -0
  191. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/runnables/__init__.py +0 -0
  192. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/structured_query.py +0 -0
  193. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tracers/_streaming.py +0 -0
  194. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tracers/core.py +0 -0
  195. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tracers/evaluation.py +0 -0
  196. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/tracers/run_collector.py +0 -0
  197. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/utils/_merge.py +0 -0
  198. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/utils/formatting.py +0 -0
  199. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/utils/image.py +0 -0
  200. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/utils/usage.py +0 -0
  201. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/langchain_core/vectorstores/__init__.py +0 -0
  202. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/scripts/check_imports.py +0 -0
  203. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/scripts/lint_imports.sh +0 -0
  204. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/__init__.py +0 -0
  205. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/benchmarks/__init__.py +0 -0
  206. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/benchmarks/test_async_callbacks.py +0 -0
  207. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/benchmarks/test_imports.py +0 -0
  208. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/integration_tests/__init__.py +0 -0
  209. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/integration_tests/test_compile.py +0 -0
  210. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/__init__.py +0 -0
  211. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/_api/__init__.py +0 -0
  212. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/_api/test_beta_decorator.py +0 -0
  213. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/_api/test_deprecation.py +0 -0
  214. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/_api/test_imports.py +0 -0
  215. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/_api/test_path.py +0 -0
  216. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/caches/__init__.py +0 -0
  217. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/caches/test_in_memory_cache.py +0 -0
  218. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/callbacks/__init__.py +0 -0
  219. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/callbacks/test_async_callback_manager.py +0 -0
  220. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/callbacks/test_dispatch_custom_event.py +0 -0
  221. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/callbacks/test_imports.py +0 -0
  222. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/callbacks/test_sync_callback_manager.py +0 -0
  223. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/callbacks/test_usage_callback.py +0 -0
  224. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/chat_history/__init__.py +0 -0
  225. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/chat_history/test_chat_history.py +0 -0
  226. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/data/prompt_file.txt +0 -0
  227. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/data/prompts/prompt_extra_args.json +0 -0
  228. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/data/prompts/prompt_missing_args.json +0 -0
  229. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/data/prompts/simple_prompt.json +0 -0
  230. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/dependencies/__init__.py +0 -0
  231. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/dependencies/test_dependencies.py +0 -0
  232. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/document_loaders/__init__.py +0 -0
  233. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/document_loaders/test_base.py +0 -0
  234. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/document_loaders/test_langsmith.py +0 -0
  235. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/documents/__init__.py +0 -0
  236. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/documents/test_document.py +0 -0
  237. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/documents/test_imports.py +0 -0
  238. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/documents/test_str.py +0 -0
  239. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/embeddings/__init__.py +0 -0
  240. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/embeddings/test_deterministic_embedding.py +0 -0
  241. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/example_selectors/__init__.py +0 -0
  242. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/example_selectors/test_base.py +0 -0
  243. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/example_selectors/test_imports.py +0 -0
  244. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/example_selectors/test_length_based_example_selector.py +0 -0
  245. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/example_selectors/test_similarity.py +0 -0
  246. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/examples/example-non-utf8.csv +0 -0
  247. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/examples/example-non-utf8.txt +0 -0
  248. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/examples/example-utf8.csv +0 -0
  249. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/examples/example-utf8.txt +0 -0
  250. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/examples/example_prompt.json +0 -0
  251. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/examples/examples.json +0 -0
  252. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/examples/examples.yaml +0 -0
  253. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/examples/few_shot_prompt.json +0 -0
  254. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/examples/few_shot_prompt.yaml +0 -0
  255. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/examples/few_shot_prompt_example_prompt.json +0 -0
  256. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/examples/few_shot_prompt_examples_in.json +0 -0
  257. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/examples/few_shot_prompt_yaml_examples.yaml +0 -0
  258. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/examples/jinja_injection_prompt.json +0 -0
  259. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/examples/jinja_injection_prompt.yaml +0 -0
  260. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/examples/prompt_with_output_parser.json +0 -0
  261. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/examples/simple_prompt.json +0 -0
  262. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/examples/simple_prompt.yaml +0 -0
  263. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/examples/simple_prompt_with_template_file.json +0 -0
  264. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/examples/simple_template.txt +0 -0
  265. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/fake/__init__.py +0 -0
  266. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/fake/callbacks.py +0 -0
  267. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/fake/test_fake_chat_model.py +0 -0
  268. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/indexing/__init__.py +0 -0
  269. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/indexing/test_hashed_document.py +0 -0
  270. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/indexing/test_in_memory_indexer.py +0 -0
  271. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/indexing/test_in_memory_record_manager.py +0 -0
  272. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/indexing/test_indexing.py +0 -0
  273. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/indexing/test_public_api.py +0 -0
  274. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/language_models/__init__.py +0 -0
  275. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/language_models/chat_models/__init__.py +0 -0
  276. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/language_models/chat_models/test_benchmark.py +0 -0
  277. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/language_models/chat_models/test_rate_limiting.py +0 -0
  278. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/language_models/llms/__init__.py +0 -0
  279. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/language_models/llms/test_base.py +0 -0
  280. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/language_models/test_imports.py +0 -0
  281. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/load/__init__.py +0 -0
  282. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/load/test_imports.py +0 -0
  283. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/load/test_serializable.py +0 -0
  284. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/messages/__init__.py +0 -0
  285. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/messages/block_translators/__init__.py +0 -0
  286. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/messages/block_translators/test_anthropic.py +0 -0
  287. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/messages/block_translators/test_bedrock.py +0 -0
  288. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/messages/block_translators/test_bedrock_converse.py +0 -0
  289. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/messages/block_translators/test_langchain_v0.py +0 -0
  290. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/messages/block_translators/test_openai.py +0 -0
  291. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/messages/test_imports.py +0 -0
  292. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/messages/test_utils.py +0 -0
  293. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/output_parsers/__init__.py +0 -0
  294. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/output_parsers/test_imports.py +0 -0
  295. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/output_parsers/test_json.py +0 -0
  296. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/output_parsers/test_list_parser.py +0 -0
  297. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/output_parsers/test_openai_functions.py +0 -0
  298. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/output_parsers/test_openai_tools.py +0 -0
  299. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/output_parsers/test_pydantic_parser.py +0 -0
  300. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/output_parsers/test_xml_parser.py +0 -0
  301. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/outputs/__init__.py +0 -0
  302. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/outputs/test_chat_generation.py +0 -0
  303. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/outputs/test_imports.py +0 -0
  304. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/prompt_file.txt +0 -0
  305. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/prompts/__init__.py +0 -0
  306. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/prompts/__snapshots__/test_prompt.ambr +0 -0
  307. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/prompts/prompt_extra_args.json +0 -0
  308. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/prompts/prompt_missing_args.json +0 -0
  309. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/prompts/simple_prompt.json +0 -0
  310. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/prompts/test_chat.py +0 -0
  311. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/prompts/test_dict.py +0 -0
  312. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/prompts/test_few_shot.py +0 -0
  313. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/prompts/test_few_shot_with_templates.py +0 -0
  314. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/prompts/test_image.py +0 -0
  315. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/prompts/test_imports.py +0 -0
  316. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/prompts/test_loading.py +0 -0
  317. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/prompts/test_prompt.py +0 -0
  318. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/prompts/test_utils.py +0 -0
  319. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/pydantic_utils.py +0 -0
  320. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/rate_limiters/__init__.py +0 -0
  321. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/rate_limiters/test_in_memory_rate_limiter.py +0 -0
  322. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/runnables/__init__.py +0 -0
  323. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/runnables/__snapshots__/test_fallbacks.ambr +0 -0
  324. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/runnables/test_concurrency.py +0 -0
  325. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/runnables/test_config.py +0 -0
  326. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/runnables/test_configurable.py +0 -0
  327. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/runnables/test_fallbacks.py +0 -0
  328. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/runnables/test_graph.py +0 -0
  329. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/runnables/test_history.py +0 -0
  330. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/runnables/test_imports.py +0 -0
  331. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/runnables/test_runnable_events_v1.py +0 -0
  332. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/runnables/test_runnable_events_v2.py +0 -0
  333. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/runnables/test_tracing_interops.py +0 -0
  334. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/runnables/test_utils.py +0 -0
  335. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/stores/__init__.py +0 -0
  336. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/stores/test_in_memory.py +0 -0
  337. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/stubs.py +0 -0
  338. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/test_globals.py +0 -0
  339. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/test_imports.py +0 -0
  340. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/test_messages.py +0 -0
  341. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/test_outputs.py +0 -0
  342. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/test_prompt_values.py +0 -0
  343. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/test_pydantic_imports.py +0 -0
  344. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/test_pydantic_serde.py +0 -0
  345. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/test_retrievers.py +0 -0
  346. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/test_setup.py +0 -0
  347. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/test_sys_info.py +0 -0
  348. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/tracers/__init__.py +0 -0
  349. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/tracers/test_async_base_tracer.py +0 -0
  350. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/tracers/test_base_tracer.py +0 -0
  351. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/tracers/test_imports.py +0 -0
  352. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/tracers/test_langchain.py +0 -0
  353. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/tracers/test_memory_stream.py +0 -0
  354. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/utils/__init__.py +0 -0
  355. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/utils/test_aiter.py +0 -0
  356. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/utils/test_env.py +0 -0
  357. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/utils/test_html.py +0 -0
  358. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/utils/test_imports.py +0 -0
  359. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/utils/test_iter.py +0 -0
  360. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/utils/test_json_schema.py +0 -0
  361. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/utils/test_pydantic.py +0 -0
  362. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/utils/test_rm_titles.py +0 -0
  363. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/utils/test_strings.py +0 -0
  364. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/utils/test_usage.py +0 -0
  365. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/vectorstores/__init__.py +0 -0
  366. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/vectorstores/test_in_memory.py +0 -0
  367. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/vectorstores/test_utils.py +0 -0
  368. {langchain_core-1.0.0a8 → langchain_core-1.0.0rc2}/tests/unit_tests/vectorstores/test_vectorstore.py +0 -0
@@ -1,10 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langchain-core
3
- Version: 1.0.0a8
3
+ Version: 1.0.0rc2
4
4
  Summary: Building applications with LLMs through composability
5
- Project-URL: Source Code, https://github.com/langchain-ai/langchain/tree/master/libs/core
6
- Project-URL: Release Notes, https://github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain-core%3D%3D0%22&expanded=true
7
- Project-URL: repository, https://github.com/langchain-ai/langchain
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
- [![PyPI - License](https://img.shields.io/pypi/l/langchain-core?style=flat-square)](https://opensource.org/licenses/MIT)
24
+ [![PyPI - Version](https://img.shields.io/pypi/v/langchain-core?label=%20)](https://pypi.org/project/langchain-core/#history)
25
+ [![PyPI - License](https://img.shields.io/pypi/l/langchain-core)](https://opensource.org/licenses/MIT)
22
26
  [![PyPI - Downloads](https://img.shields.io/pepy/dt/langchain-core)](https://pypistats.org/packages/langchain-core)
27
+ [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/langchainai.svg?style=social&label=Follow%20%40LangChainAI)](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 it?
40
+ ## 🤔 What is this?
31
41
 
32
- LangChain Core contains the base abstractions that power the the LangChain ecosystem.
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 Policy](https://docs.langchain.com/oss/python/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).
@@ -1,7 +1,14 @@
1
1
  # 🦜🍎️ LangChain Core
2
2
 
3
- [![PyPI - License](https://img.shields.io/pypi/l/langchain-core?style=flat-square)](https://opensource.org/licenses/MIT)
3
+ [![PyPI - Version](https://img.shields.io/pypi/v/langchain-core?label=%20)](https://pypi.org/project/langchain-core/#history)
4
+ [![PyPI - License](https://img.shields.io/pypi/l/langchain-core)](https://opensource.org/licenses/MIT)
4
5
  [![PyPI - Downloads](https://img.shields.io/pepy/dt/langchain-core)](https://pypistats.org/packages/langchain-core)
6
+ [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/langchainai.svg?style=social&label=Follow%20%40LangChainAI)](https://twitter.com/langchainai)
7
+
8
+ Looking for the JS/TS version? Check out [LangChain.js](https://github.com/langchain-ai/langchainjs).
9
+
10
+ To help you ship LangChain apps to production faster, check out [LangSmith](https://smith.langchain.com).
11
+ [LangSmith](https://smith.langchain.com) is a unified developer platform for building, testing, and monitoring LLM applications.
5
12
 
6
13
  ## Quick Install
7
14
 
@@ -9,16 +16,14 @@
9
16
  pip install langchain-core
10
17
  ```
11
18
 
12
- ## What is it?
19
+ ## 🤔 What is this?
13
20
 
14
- LangChain Core contains the base abstractions that power the the LangChain ecosystem.
21
+ LangChain Core contains the base abstractions that power the LangChain ecosystem.
15
22
 
16
23
  These abstractions are designed to be as modular and simple as possible.
17
24
 
18
25
  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.
19
26
 
20
- For full documentation see the [API reference](https://reference.langchain.com/python/).
21
-
22
27
  ## ⛰️ Why build on top of LangChain Core?
23
28
 
24
29
  The LangChain ecosystem is built on top of `langchain-core`. Some of the benefits:
@@ -27,12 +32,16 @@ The LangChain ecosystem is built on top of `langchain-core`. Some of the benefit
27
32
  - **Stability**: We are committed to a stable versioning scheme, and will communicate any breaking changes with advance notice and version bumps.
28
33
  - **Battle-tested**: Core components have the largest install base in the LLM ecosystem, and are used in production by many companies.
29
34
 
35
+ ## 📖 Documentation
36
+
37
+ For full documentation, see the [API reference](https://reference.langchain.com/python/langchain_core/).
38
+
30
39
  ## 📕 Releases & Versioning
31
40
 
32
- See our [Releases](https://docs.langchain.com/oss/python/release-policy) and [Versioning Policy](https://docs.langchain.com/oss/python/versioning).
41
+ See our [Releases](https://docs.langchain.com/oss/python/release-policy) and [Versioning](https://docs.langchain.com/oss/python/versioning) policies.
33
42
 
34
43
  ## 💁 Contributing
35
44
 
36
45
  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.
37
46
 
38
- For detailed information on how to contribute, see the [Contributing Guide](https://docs.langchain.com/oss/python/contributing).
47
+ For detailed information on how to contribute, see the [Contributing Guide](https://docs.langchain.com/oss/python/contributing/overview).
@@ -1,4 +1,4 @@
1
- """``langchain-core`` defines the base abstractions for the LangChain ecosystem.
1
+ """`langchain-core` defines the base abstractions for the LangChain ecosystem.
2
2
 
3
3
  The interfaces for core components like chat models, LLMs, vector stores, retrievers,
4
4
  and more are defined here. The universal invocation protocol (Runnables) along with
@@ -6,7 +6,6 @@ This module is only relevant for LangChain developers, not for users.
6
6
 
7
7
  This module and its submodules are for internal use only. Do not use them in your
8
8
  own code. We may change the API at any time with no warning.
9
-
10
9
  """
11
10
 
12
11
  from typing import TYPE_CHECKING
@@ -40,40 +40,37 @@ def beta(
40
40
  """Decorator to mark a function, a class, or a property as beta.
41
41
 
42
42
  When marking a classmethod, a staticmethod, or a property, the
43
- ``@beta`` decorator should go *under* ``@classmethod`` and
44
- ``@staticmethod`` (i.e., `beta` should directly decorate the
45
- underlying callable), but *over* ``@property``.
43
+ `@beta` decorator should go *under* `@classmethod` and
44
+ `@staticmethod` (i.e., `beta` should directly decorate the
45
+ underlying callable), but *over* `@property`.
46
46
 
47
- When marking a class ``C`` intended to be used as a base class in a
48
- multiple inheritance hierarchy, ``C`` *must* define an ``__init__`` method
49
- (if ``C`` instead inherited its ``__init__`` from its own base class, then
50
- ``@beta`` would mess up ``__init__`` inheritance when installing its
51
- own (annotation-emitting) ``C.__init__``).
47
+ When marking a class `C` intended to be used as a base class in a
48
+ multiple inheritance hierarchy, `C` *must* define an `__init__` method
49
+ (if `C` instead inherited its `__init__` from its own base class, then
50
+ `@beta` would mess up `__init__` inheritance when installing its
51
+ own (annotation-emitting) `C.__init__`).
52
52
 
53
53
  Args:
54
- message : str, optional
54
+ message:
55
55
  Override the default beta message. The %(since)s,
56
56
  %(name)s, %(alternative)s, %(obj_type)s, %(addendum)s,
57
57
  and %(removal)s format specifiers will be replaced by the
58
58
  values of the respective arguments passed to this function.
59
- name : str, optional
59
+ name:
60
60
  The name of the beta object.
61
- obj_type : str, optional
61
+ obj_type:
62
62
  The object type being beta.
63
- addendum : str, optional
63
+ addendum:
64
64
  Additional text appended directly to the final message.
65
65
 
66
66
  Returns:
67
67
  A decorator which can be used to mark functions or classes as beta.
68
68
 
69
- Examples:
70
-
71
- .. code-block:: python
72
-
73
- @beta
74
- def the_function_to_annotate():
75
- pass
76
-
69
+ ```python
70
+ @beta
71
+ def the_function_to_annotate():
72
+ pass
73
+ ```
77
74
  """
78
75
 
79
76
  def beta(
@@ -82,62 +82,59 @@ def deprecated(
82
82
  """Decorator to mark a function, a class, or a property as deprecated.
83
83
 
84
84
  When deprecating a classmethod, a staticmethod, or a property, the
85
- ``@deprecated`` decorator should go *under* ``@classmethod`` and
86
- ``@staticmethod`` (i.e., `deprecated` should directly decorate the
87
- underlying callable), but *over* ``@property``.
85
+ `@deprecated` decorator should go *under* `@classmethod` and
86
+ `@staticmethod` (i.e., `deprecated` should directly decorate the
87
+ underlying callable), but *over* `@property`.
88
88
 
89
- When deprecating a class ``C`` intended to be used as a base class in a
90
- multiple inheritance hierarchy, ``C`` *must* define an ``__init__`` method
91
- (if ``C`` instead inherited its ``__init__`` from its own base class, then
92
- ``@deprecated`` would mess up ``__init__`` inheritance when installing its
93
- own (deprecation-emitting) ``C.__init__``).
89
+ When deprecating a class `C` intended to be used as a base class in a
90
+ multiple inheritance hierarchy, `C` *must* define an `__init__` method
91
+ (if `C` instead inherited its `__init__` from its own base class, then
92
+ `@deprecated` would mess up `__init__` inheritance when installing its
93
+ own (deprecation-emitting) `C.__init__`).
94
94
 
95
95
  Parameters are the same as for `warn_deprecated`, except that *obj_type*
96
96
  defaults to 'class' if decorating a class, 'attribute' if decorating a
97
97
  property, and 'function' otherwise.
98
98
 
99
99
  Args:
100
- since : str
100
+ since:
101
101
  The release at which this API became deprecated.
102
- message : str, optional
102
+ message:
103
103
  Override the default deprecation message. The %(since)s,
104
104
  %(name)s, %(alternative)s, %(obj_type)s, %(addendum)s,
105
105
  and %(removal)s format specifiers will be replaced by the
106
106
  values of the respective arguments passed to this function.
107
- name : str, optional
107
+ name:
108
108
  The name of the deprecated object.
109
- alternative : str, optional
109
+ alternative:
110
110
  An alternative API that the user may use in place of the
111
111
  deprecated API. The deprecation warning will tell the user
112
112
  about this alternative if provided.
113
- alternative_import: str, optional
113
+ alternative_import:
114
114
  An alternative import that the user may use instead.
115
- pending : bool, optional
116
- If True, uses a PendingDeprecationWarning instead of a
115
+ pending:
116
+ If `True`, uses a `PendingDeprecationWarning` instead of a
117
117
  DeprecationWarning. Cannot be used together with removal.
118
- obj_type : str, optional
118
+ obj_type:
119
119
  The object type being deprecated.
120
- addendum : str, optional
120
+ addendum:
121
121
  Additional text appended directly to the final message.
122
- removal : str, optional
122
+ removal:
123
123
  The expected removal version. With the default (an empty
124
124
  string), a removal version is automatically computed from
125
125
  since. Set to other Falsy values to not schedule a removal
126
126
  date. Cannot be used together with pending.
127
- package: str, optional
127
+ package:
128
128
  The package of the deprecated object.
129
129
 
130
130
  Returns:
131
131
  A decorator to mark a function or class as deprecated.
132
132
 
133
- Examples:
134
-
135
- .. code-block:: python
136
-
137
- @deprecated("1.4.0")
138
- def the_function_to_deprecate():
139
- pass
140
-
133
+ ```python
134
+ @deprecated("1.4.0")
135
+ def the_function_to_deprecate():
136
+ pass
137
+ ```
141
138
  """
142
139
  _validate_deprecation_params(
143
140
  removal, alternative, alternative_import, pending=pending
@@ -372,7 +369,7 @@ def deprecated(
372
369
  components = [
373
370
  _message,
374
371
  f"Use {_alternative} instead." if _alternative else "",
375
- f"Use ``{_alternative_import}`` instead." if _alternative_import else "",
372
+ f"Use `{_alternative_import}` instead." if _alternative_import else "",
376
373
  _addendum,
377
374
  ]
378
375
  details = " ".join([component.strip() for component in components if component])
@@ -440,7 +437,7 @@ def warn_deprecated(
440
437
  alternative_import:
441
438
  An alternative import that the user may use instead.
442
439
  pending:
443
- If True, uses a PendingDeprecationWarning instead of a
440
+ If `True`, uses a `PendingDeprecationWarning` instead of a
444
441
  DeprecationWarning. Cannot be used together with removal.
445
442
  obj_type:
446
443
  The object type being deprecated.
@@ -550,12 +547,10 @@ def rename_parameter(
550
547
  A decorator indicating that a parameter was renamed.
551
548
 
552
549
  Example:
553
-
554
- .. code-block:: python
555
-
556
- @_api.rename_parameter("3.1", "bad_name", "good_name")
557
- def func(good_name): ...
558
-
550
+ ```python
551
+ @_api.rename_parameter("3.1", "bad_name", "good_name")
552
+ def func(good_name): ...
553
+ ```
559
554
  """
560
555
 
561
556
  def decorator(f: Callable[_P, _R]) -> Callable[_P, _R]:
@@ -13,7 +13,7 @@ def import_attr(
13
13
 
14
14
  Args:
15
15
  attr_name: The name of the attribute to import.
16
- module_name: The name of the module to import from. If None, the attribute
16
+ module_name: The name of the module to import from. If `None`, the attribute
17
17
  is imported from the package itself.
18
18
  package: The name of the package where the module is located.
19
19
 
@@ -1,8 +1,9 @@
1
1
  """Schema definitions for representing agent actions, observations, and return values.
2
2
 
3
- **ATTENTION** The schema definitions are provided for backwards compatibility.
3
+ !!! warning
4
+ The schema definitions are provided for backwards compatibility.
4
5
 
5
- !!! important
6
+ !!! warning
6
7
  New agents should be built using the
7
8
  [langgraph library](https://github.com/langchain-ai/langgraph), which provides a
8
9
  simpler and more flexible way to define agents.
@@ -16,10 +17,10 @@ Agents use language models to choose a sequence of actions to take.
16
17
  A basic agent works in the following manner:
17
18
 
18
19
  1. Given a prompt an agent uses an LLM to request an action to take
19
- (e.g., a tool to run).
20
+ (e.g., a tool to run).
20
21
  2. The agent executes the action (e.g., runs the tool), and receives an observation.
21
22
  3. The agent returns the observation to the LLM, which can then be used to generate
22
- the next action.
23
+ the next action.
23
24
  4. When the agent reaches a stopping condition, it returns a final return value.
24
25
 
25
26
  The schemas for the agents themselves are defined in langchain.agents.agent.
@@ -83,10 +84,10 @@ class AgentAction(Serializable):
83
84
 
84
85
  @classmethod
85
86
  def get_lc_namespace(cls) -> list[str]:
86
- """Get the namespace of the langchain object.
87
+ """Get the namespace of the LangChain object.
87
88
 
88
89
  Returns:
89
- ``["langchain", "schema", "agent"]``
90
+ `["langchain", "schema", "agent"]`
90
91
  """
91
92
  return ["langchain", "schema", "agent"]
92
93
 
@@ -111,7 +112,7 @@ class AgentActionMessageLog(AgentAction):
111
112
  if (tool, tool_input) cannot be used to fully recreate the LLM
112
113
  prediction, and you need that LLM prediction (for future agent iteration).
113
114
  Compared to `log`, this is useful when the underlying LLM is a
114
- ChatModel (and therefore returns messages rather than a string)."""
115
+ chat model (and therefore returns messages rather than a string)."""
115
116
  # Ignoring type because we're overriding the type from AgentAction.
116
117
  # And this is the correct thing to do in this case.
117
118
  # The type literal is used for serialization purposes.
@@ -160,10 +161,10 @@ class AgentFinish(Serializable):
160
161
 
161
162
  @classmethod
162
163
  def get_lc_namespace(cls) -> list[str]:
163
- """Get the namespace of the langchain object.
164
+ """Get the namespace of the LangChain object.
164
165
 
165
166
  Returns:
166
- ``["langchain", "schema", "agent"]``
167
+ `["langchain", "schema", "agent"]`
167
168
  """
168
169
  return ["langchain", "schema", "agent"]
169
170
 
@@ -1,24 +1,15 @@
1
- """Cache classes.
1
+ """`caches` provides an optional caching layer for language models.
2
2
 
3
3
  !!! warning
4
- Beta Feature!
4
+ This is a beta feature! Please be wary of deploying experimental code to production
5
+ unless you've taken appropriate precautions.
5
6
 
6
- **Cache** provides an optional caching layer for LLMs.
7
+ A cache is useful for two reasons:
7
8
 
8
- Cache is useful for two reasons:
9
-
10
- - It can save you money by reducing the number of API calls you make to the LLM
11
- provider if you're often requesting the same completion multiple times.
12
- - It can speed up your application by reducing the number of API calls you make
13
- to the LLM provider.
14
-
15
- Cache directly competes with Memory. See documentation for Pros and Cons.
16
-
17
- **Class hierarchy:**
18
-
19
- .. code-block::
20
-
21
- BaseCache --> <name>Cache # Examples: InMemoryCache, RedisCache, GPTCache
9
+ 1. It can save you money by reducing the number of API calls you make to the LLM
10
+ provider if you're often requesting the same completion multiple times.
11
+ 2. It can speed up your application by reducing the number of API calls you make to the
12
+ LLM provider.
22
13
  """
23
14
 
24
15
  from __future__ import annotations
@@ -40,8 +31,8 @@ class BaseCache(ABC):
40
31
 
41
32
  The cache interface consists of the following methods:
42
33
 
43
- - lookup: Look up a value based on a prompt and llm_string.
44
- - update: Update the cache based on a prompt and llm_string.
34
+ - lookup: Look up a value based on a prompt and `llm_string`.
35
+ - update: Update the cache based on a prompt and `llm_string`.
45
36
  - clear: Clear the cache.
46
37
 
47
38
  In addition, the cache interface provides an async version of each method.
@@ -53,14 +44,14 @@ class BaseCache(ABC):
53
44
 
54
45
  @abstractmethod
55
46
  def lookup(self, prompt: str, llm_string: str) -> RETURN_VAL_TYPE | None:
56
- """Look up based on prompt and llm_string.
47
+ """Look up based on `prompt` and `llm_string`.
57
48
 
58
49
  A cache implementation is expected to generate a key from the 2-tuple
59
50
  of prompt and llm_string (e.g., by concatenating them with a delimiter).
60
51
 
61
52
  Args:
62
- prompt: a string representation of the prompt.
63
- In the case of a Chat model, the prompt is a non-trivial
53
+ prompt: A string representation of the prompt.
54
+ In the case of a chat model, the prompt is a non-trivial
64
55
  serialization of the prompt into the language model.
65
56
  llm_string: A string representation of the LLM configuration.
66
57
  This is used to capture the invocation parameters of the LLM
@@ -69,27 +60,27 @@ class BaseCache(ABC):
69
60
  representation.
70
61
 
71
62
  Returns:
72
- On a cache miss, return None. On a cache hit, return the cached value.
73
- The cached value is a list of Generations (or subclasses).
63
+ On a cache miss, return `None`. On a cache hit, return the cached value.
64
+ The cached value is a list of `Generation` (or subclasses).
74
65
  """
75
66
 
76
67
  @abstractmethod
77
68
  def update(self, prompt: str, llm_string: str, return_val: RETURN_VAL_TYPE) -> None:
78
- """Update cache based on prompt and llm_string.
69
+ """Update cache based on `prompt` and `llm_string`.
79
70
 
80
71
  The prompt and llm_string are used to generate a key for the cache.
81
72
  The key should match that of the lookup method.
82
73
 
83
74
  Args:
84
- prompt: a string representation of the prompt.
85
- In the case of a Chat model, the prompt is a non-trivial
75
+ prompt: A string representation of the prompt.
76
+ In the case of a chat model, the prompt is a non-trivial
86
77
  serialization of the prompt into the language model.
87
78
  llm_string: A string representation of the LLM configuration.
88
79
  This is used to capture the invocation parameters of the LLM
89
80
  (e.g., model name, temperature, stop tokens, max tokens, etc.).
90
81
  These invocation parameters are serialized into a string
91
82
  representation.
92
- return_val: The value to be cached. The value is a list of Generations
83
+ return_val: The value to be cached. The value is a list of `Generation`
93
84
  (or subclasses).
94
85
  """
95
86
 
@@ -98,14 +89,14 @@ class BaseCache(ABC):
98
89
  """Clear cache that can take additional keyword arguments."""
99
90
 
100
91
  async def alookup(self, prompt: str, llm_string: str) -> RETURN_VAL_TYPE | None:
101
- """Async look up based on prompt and llm_string.
92
+ """Async look up based on `prompt` and `llm_string`.
102
93
 
103
94
  A cache implementation is expected to generate a key from the 2-tuple
104
95
  of prompt and llm_string (e.g., by concatenating them with a delimiter).
105
96
 
106
97
  Args:
107
- prompt: a string representation of the prompt.
108
- In the case of a Chat model, the prompt is a non-trivial
98
+ prompt: A string representation of the prompt.
99
+ In the case of a chat model, the prompt is a non-trivial
109
100
  serialization of the prompt into the language model.
110
101
  llm_string: A string representation of the LLM configuration.
111
102
  This is used to capture the invocation parameters of the LLM
@@ -114,29 +105,29 @@ class BaseCache(ABC):
114
105
  representation.
115
106
 
116
107
  Returns:
117
- On a cache miss, return None. On a cache hit, return the cached value.
118
- The cached value is a list of Generations (or subclasses).
108
+ On a cache miss, return `None`. On a cache hit, return the cached value.
109
+ The cached value is a list of `Generation` (or subclasses).
119
110
  """
120
111
  return await run_in_executor(None, self.lookup, prompt, llm_string)
121
112
 
122
113
  async def aupdate(
123
114
  self, prompt: str, llm_string: str, return_val: RETURN_VAL_TYPE
124
115
  ) -> None:
125
- """Async update cache based on prompt and llm_string.
116
+ """Async update cache based on `prompt` and `llm_string`.
126
117
 
127
118
  The prompt and llm_string are used to generate a key for the cache.
128
119
  The key should match that of the look up method.
129
120
 
130
121
  Args:
131
- prompt: a string representation of the prompt.
132
- In the case of a Chat model, the prompt is a non-trivial
122
+ prompt: A string representation of the prompt.
123
+ In the case of a chat model, the prompt is a non-trivial
133
124
  serialization of the prompt into the language model.
134
125
  llm_string: A string representation of the LLM configuration.
135
126
  This is used to capture the invocation parameters of the LLM
136
127
  (e.g., model name, temperature, stop tokens, max tokens, etc.).
137
128
  These invocation parameters are serialized into a string
138
129
  representation.
139
- return_val: The value to be cached. The value is a list of Generations
130
+ return_val: The value to be cached. The value is a list of `Generation`
140
131
  (or subclasses).
141
132
  """
142
133
  return await run_in_executor(None, self.update, prompt, llm_string, return_val)
@@ -154,12 +145,11 @@ class InMemoryCache(BaseCache):
154
145
 
155
146
  Args:
156
147
  maxsize: The maximum number of items to store in the cache.
157
- If None, the cache has no maximum size.
148
+ If `None`, the cache has no maximum size.
158
149
  If the cache exceeds the maximum size, the oldest items are removed.
159
- Default is None.
160
150
 
161
151
  Raises:
162
- ValueError: If maxsize is less than or equal to 0.
152
+ ValueError: If `maxsize` is less than or equal to `0`.
163
153
  """
164
154
  self._cache: dict[tuple[str, str], RETURN_VAL_TYPE] = {}
165
155
  if maxsize is not None and maxsize <= 0:
@@ -168,28 +158,28 @@ class InMemoryCache(BaseCache):
168
158
  self._maxsize = maxsize
169
159
 
170
160
  def lookup(self, prompt: str, llm_string: str) -> RETURN_VAL_TYPE | None:
171
- """Look up based on prompt and llm_string.
161
+ """Look up based on `prompt` and `llm_string`.
172
162
 
173
163
  Args:
174
- prompt: a string representation of the prompt.
175
- In the case of a Chat model, the prompt is a non-trivial
164
+ prompt: A string representation of the prompt.
165
+ In the case of a chat model, the prompt is a non-trivial
176
166
  serialization of the prompt into the language model.
177
167
  llm_string: A string representation of the LLM configuration.
178
168
 
179
169
  Returns:
180
- On a cache miss, return None. On a cache hit, return the cached value.
170
+ On a cache miss, return `None`. On a cache hit, return the cached value.
181
171
  """
182
172
  return self._cache.get((prompt, llm_string), None)
183
173
 
184
174
  def update(self, prompt: str, llm_string: str, return_val: RETURN_VAL_TYPE) -> None:
185
- """Update cache based on prompt and llm_string.
175
+ """Update cache based on `prompt` and `llm_string`.
186
176
 
187
177
  Args:
188
- prompt: a string representation of the prompt.
189
- In the case of a Chat model, the prompt is a non-trivial
178
+ prompt: A string representation of the prompt.
179
+ In the case of a chat model, the prompt is a non-trivial
190
180
  serialization of the prompt into the language model.
191
181
  llm_string: A string representation of the LLM configuration.
192
- return_val: The value to be cached. The value is a list of Generations
182
+ return_val: The value to be cached. The value is a list of `Generation`
193
183
  (or subclasses).
194
184
  """
195
185
  if self._maxsize is not None and len(self._cache) == self._maxsize:
@@ -202,30 +192,30 @@ class InMemoryCache(BaseCache):
202
192
  self._cache = {}
203
193
 
204
194
  async def alookup(self, prompt: str, llm_string: str) -> RETURN_VAL_TYPE | None:
205
- """Async look up based on prompt and llm_string.
195
+ """Async look up based on `prompt` and `llm_string`.
206
196
 
207
197
  Args:
208
- prompt: a string representation of the prompt.
209
- In the case of a Chat model, the prompt is a non-trivial
198
+ prompt: A string representation of the prompt.
199
+ In the case of a chat model, the prompt is a non-trivial
210
200
  serialization of the prompt into the language model.
211
201
  llm_string: A string representation of the LLM configuration.
212
202
 
213
203
  Returns:
214
- On a cache miss, return None. On a cache hit, return the cached value.
204
+ On a cache miss, return `None`. On a cache hit, return the cached value.
215
205
  """
216
206
  return self.lookup(prompt, llm_string)
217
207
 
218
208
  async def aupdate(
219
209
  self, prompt: str, llm_string: str, return_val: RETURN_VAL_TYPE
220
210
  ) -> None:
221
- """Async update cache based on prompt and llm_string.
211
+ """Async update cache based on `prompt` and `llm_string`.
222
212
 
223
213
  Args:
224
- prompt: a string representation of the prompt.
225
- In the case of a Chat model, the prompt is a non-trivial
214
+ prompt: A string representation of the prompt.
215
+ In the case of a chat model, the prompt is a non-trivial
226
216
  serialization of the prompt into the language model.
227
217
  llm_string: A string representation of the LLM configuration.
228
- return_val: The value to be cached. The value is a list of Generations
218
+ return_val: The value to be cached. The value is a list of `Generation`
229
219
  (or subclasses).
230
220
  """
231
221
  self.update(prompt, llm_string, return_val)
@@ -1,11 +1,4 @@
1
- """**Callback handlers** allow listening to events in LangChain.
2
-
3
- **Class hierarchy:**
4
-
5
- .. code-block::
6
-
7
- BaseCallbackHandler --> <name>CallbackHandler # Example: AimCallbackHandler
8
- """
1
+ """**Callback handlers** allow listening to events in LangChain."""
9
2
 
10
3
  from typing import TYPE_CHECKING
11
4